Home > Article > Web Front-end > What are the basic controls of HTML?
This time I will bring you what are the basic controls of HTML and what are the precautions for using HTML controls. The following is a practical case, let's take a look.
d5fd7aea971a85678ba271703566ebfd Tagd5fd7aea971a85678ba271703566ebfd Tag is used to collect user information. type attributeAccording to different type attribute values, the input field has many forms. It can be a text field, check box, masked text control,radio button, button, etc.
text: text area readonly attribute: whether it is read-only. password: password area, the entered text is displayed with '*' checkbox: check box checked attribute: whether to check; radio: Radio button; name attribute: Specify multiple radio button boxes to perform radio selection operations in an area reset: Reset all labels in the current ff9c23ada1bcecdd1a0fb5d5a0f18437 form to the initialized state (Such as clearing the content of the text area) submit: Submit the current ff9c23ada1bcecdd1a0fb5d5a0f18437 form information to the specified page button: Ordinary button Value attribute: The text displayed by the button button file: file selection taghide: hidden area, you can store some information that is not displayed to the user but is used by yourselfimage: picture area src attribute: specifies the path where the image is stored; title attribute: the text displayed when the mouse moves over the image;
alt: the text displayed when the image fails to load or is closed;
drop-down list size. The default is combox style; when it is greater than 1, it is listbox style.
2) multiple {boolean}: Whethermultiple selection. For multiple selections, hold down Ctrl + left button to perform multiple selection operations.
3) item sub-item: ① 5b7a15bed8615d1b843806256bebea72 label: defines the category of the selected item, which cannot be selected. Label {string} Attribute: The name of the category display Title {string} Attribute: Move the mouse to the selected item, the information to be displayed
Title {string} Attribute: Move the mouse to the selected item, the information to be displayed
<h3>select标签</h3> <select id="province" multiple=multiple size="6" > <optgroup label="直辖市" ></optgroup> <option value="bj" title="北京市" >北京</option> <option value="sh">上海</option> <optgroup label="省市" ></optgroup> <option value="zj">浙江</option> <option value="fj">福建</option> </select>680204f04b0c98aa3c923e36bb5ad6edTagMulti-line text area, the size of the textarea can be set through the cols and rows attributes. Attributesrows {int}: Indicates the number of rows displayed.
cols {int}: Indicates the number of columns displayed.
readonly {boolean}: Whether it is read-only.
<table> <tr> <td><label for='username'>姓名:</label></td> <td><input type="text" id='username'/></td> </tr> <tr> <td><label for='userpwd'>密码:</label></td> <td><input type="password" id='userpwd' /></td> </tr> </table>Example
<fieldset>标签 类似于winform中的groupBox控件。 item子项 <legend></legend>:表示抬头的名称。 <h3>fieldset标签</h3> <fieldset style='width:130px' > <legend>性别</legend> <input type="radio" name='sex' value='boy' />男 <input type="radio" name='sex' value='girl' />女 </fieldset>Exampleul, ol, li list tagsul: unordered list (unordered list) ol: ordered list (ordered list)) li: list item (list item), based on the above two list sub-items.
<ul type=circle> <li>ul1</li> <li>ul2</li> <li>ul3</li> </ul> <ol type=1> <li>li1</li> <li>li2</li> <li>li3</li> </ol>Attributetype {string}: Defines the symbol style in front of the 25edfb22a4f469ecb59f1190150159c6 tag. ul: type includes: circle hollow circle, disc solid circle, square solid square, none: no sign in front; ol: type includes: 1: indicates ordered 1, 2, 3; a: represents ordered a, b, c; i: Roman numerals i, ii, iii; although it can also be defined as: circle, disc, square, none, but in reality it is a sequence of 1, 2, 3, etc.; I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website! Related reading:
How to insert a video into an HTML webpage
How to use HTML+CSS to make a mouseover You can display the secondary menu bar
How to make the front-end interface automatically clear the cache of js and css files
The above is the detailed content of What are the basic controls of HTML?. For more information, please follow other related articles on the PHP Chinese website!