HTML Datalist Tag


The Tag is used to enable the “autocomplete” feature for elements. Users will see a drop-down list of predefined options before entering data.

The HTML Tag is used to autocomplete the feature on the form element. It provides a list of predefined options for users to select data.

The Tag should be used with the list” attribute. The value of the “list” attribute is associated with the datalist ID.

Example:-




	
	
		HTML datalist Tag
	



	

HTML Datalist Tag Example

Output:-

HTML Datalist Tag Example

HTML datalist Tag

HTML Optgroup Tag

HTML Tag

HTML Tag is used to group related in drop-down list within with the Tag makes it easier to access the dropdown list, especially if the list contains a large number of options.

Example:-




    
    
        HTML optgroup Tag
    



This is HTML optgroup tag Example

Output:-

HTML Option Tag

HTML

HTML is used to define options in the dropdown list inside

Output:-


Leave a Comment