This HTML tutorial explains how to use the HTML element called the tag with syntax and examples.
Sự miêu tả
The HTML tag creates a dropdown list of values that a user can choose from. These dropdown values are defined by a series of tags within the tag. This tag is also commonly referred to as the element.
cú pháp
In HTML, the syntax for the tag is:
Tutorials:
HTML
CSS
SQL
Đầu ra mẫu
Thuộc tính
In addition to the Global Attributes, the following is a list of attributes that are specific to the tag:
AttributeDescriptionHTML CompatibilityautocompleteValue of either on
or off
to indicate whether the browser can automatically complete the values in the control based on values previously entered in the formHTML 4.01, HTML5autofocusBoolean value indicating that the control has input focus when the page is loaded, unless the user overrides it.HTML 4.01, HTML5disabledBoolean value indicating that the user cannot interact with the control.HTML 4.01, HTML5formValue indicating the form that owns the control. It is the
0 of a in the same document.HTML 4.01, HTML5multipleBoolean value indicating whether multiple options can be selected in the control. The default value for the control is to only allow one option to be selected.HTML 4.01, HTML5nameName of the controlHTML 4.01, HTML5requiredBoolean value indicating whether the control is required. Required controls must be completed before the form can be submitted.HTML 4.01, HTML5sizeThe number of rows visible in the control when
0 is specified or the control is displayed as a scrolling list box. The default value for size is 0.HTML 4.01, HTML5
Ghi chú
- The HTML element is found within the tag. The tag is usually found within the tag.
- The tag contains a set of tags that provide the list of dropdown values.
- By default, the first option in the tag will appear as the selected item. The user can select another option in the dropdown list.
tính tương thích của trình duyệt web
The tag has basic support with the following browsers:
- Trình duyệt Chrome
- Android
- Firefox [Tắc kè]
- Firefox Di động [Tắc kè]
- Internet Explorer [IE]
- Cạnh di động
- Ô-pê-ra
- Opera di động
- Safari [WebKit]
- Safari di động
Ví dụ
We will discuss the tag below, exploring examples of how to use the tag in HTML5, HTML 4.01 Transitional, XHTML 1.0 Transitional, XHTML 1.0 Strict, and XHTML 1.1.
- HTML5
- HTML4
- XHTML
Tài liệu HTML5
If you created a new web page in HTML5, your tag might look like this:
HTML5 Example by www.techonthenet.com
Tutorials:
HTML
CSS
SQL
In this HTML5 Document example, we have used the tag to create a list of three dropdown values - HTML, CSS and SQL. These values will appear as a drop down list for the user to select from.
HTML4. 01 Văn bản chuyển tiếp
If you created a new web page in HTML 4.01 Transitional, your tag might look like this:
HTML 4.01 Transitional Example by www.techonthenet.com
Tutorials:
HTML
CSS
SQL
In this HTML 4.01 Transitional Document example, we have used the tag to create a list of three dropdown values - HTML, CSS and SQL. These values will appear as a drop down list for the user to select from.
XHTML 1. 0 Tài liệu chuyển tiếp
If you created a new web page in XHTML 1.0 Transitional, your tag might look like this:
XHMTL 1.0 Transitional Example by www.techonthenet.com
Tutorials:
HTML
CSS
SQL
In this XHTML 1.0 Transitional Document example, we have used the tag to create a list of three dropdown values - HTML, CSS and SQL. These values will appear as a drop down list for the user to select from.
XHTML 1. 0 Tài liệu nghiêm ngặt
If you created a new web page in XHTML 1.0 Strict, your tag might look like this:
XHTML 1.0 Strict Example by www.techonthenet.com
Tutorials:
HTML
CSS
SQL
In this XHTML 1.0 Strict Document example, we have used the tag to create a list of three dropdown values - HTML, CSS and SQL. These values will appear as a drop down list for the user to select from.
XHTML 1. 1 tài liệu
If you created a new web page in XHTML 1.1, your tag might look like this:
XHTML 1.1 Example by www.techonthenet.com
Tutorials:
HTML
CSS
SQL
Trong XHTML 1 này. 1 Ví dụ về tài liệu, chúng tôi đã sử dụng thẻ để tạo danh sách gồm ba giá trị thả xuống - HTML, CSS và SQL. Các giá trị này sẽ xuất hiện dưới dạng danh sách thả xuống để người dùng chọn từ