This article mainly introduces the use of HTML related tags, as well as the role of its commonly used tags.
First, the introduction of HTML
HTML is the initials of hypertext mark-up Language, meaning Hypertext Markup Language, hyper-text refers to hyperlinks, tags refers to the label is a language used to make Web pages, the language is composed of a label, Files made in this language are saved as a text file with a file extension of HTML or HTM.
Its basic structure is:
<!DOCTYPE HTML><HTML><Head> <MetaCharSet= "Utf-8"> <!--Specify encoding format - <title>HTML title</title></Head><Body> <H1>Hello World</H1></Body></HTML>
This is one of the simplest HTML documents, which mainly contains:
<! DOCTYPE Html>: The first line is the document Declaration;
head Changga : 79925886
<body></body>: Write the content displayed on the Web page in <body>.
Second, the common HTML tags
Often we divide HTML tags into block element tags and inline element tags, which are:
Block elements: A row is exclusive by default in the layout, and the elements after the block elements need to be arranged in a newline.
Inline elements: Elements can be arranged on one line, the width height is invalid, and its width is open by the content.
2.1 Common block element Tags:
1, Title Tags: h1-h6, that is, the first level heading to six level title;
2. Paragraph label:<p></p>
4, Box label: <div></div>, usually used for layout;
5. List Label:
< ul > < Li > List labels </li> <li> List Labels </ Li > </ ul >
6. Table Label
<Table> <!--Table Labels - <TR> <!--Line - <th>Name</th> <!--Table Header Cell - <th>Age</th> <th>Gender</th> </TR> <TR> <TD>Alex</TD> <!--Normal cell - <TD>35</TD> <TD>Male</TD> </TR></Table>
7. Form Label
<formAction= "http://www ..."Method= "Get"> <P><label>Name:</label><inputtype= "text"name= "username" /></P> <P><label>Password:</label><inputtype= "Password"name= "Password" /></P> <P> <label>Gender:</label> <inputtype= "Radio"name= "Gender"value= "0" />male<inputtype= "Radio"name= "Gender"value= "1" />female</P> <P> <label>Hobby:</label> <inputtype= "checkbox"name= "like"value= "Sing" />singing<inputtype= "checkbox"name= "like"value= "Run" />Running<inputtype= "checkbox"name= "like"value= "Swiming" />Swimming</P> <P> <label>Photo:</label> <inputtype= "File"name= "Person_pic"> </P> <P> <label>Personal Description:</label> <textareaname= "about"></textarea> </P> <P> <label>Origin:</label> <Selectname= "Site"> <optionvalue= "0">Beijing</option> <optionvalue= "1">Shanghai</option> <optionvalue= "2">Guangzhou</option> <optionvalue= "3">Shenzhen</option> </Select> </P> <P> <inputtype= "Submit"name=""value= "Submit"> <inputtype= "Reset"name=""value= "Reset"> </P></form>
Form Labels
1, <form> tags define the overall form area, properties: The Action property defines the form data submission address, the method attribute defines how the form submits, generally "get" mode and "post" mode;
2. <label> tags define text annotations for form elements;
3, <input> label definition of common form elements;
① Type property
- Type= "Text" to define a single line text input box
- Type= "password" Define password input box
- Type= "Radio" defined Radio box
- type= "checkbox" Definition check box
- type= "file" definition to upload files
- type= "submit" Definition submit button
- Type= "Reset" defines the reset button
- Type= "button" defines a normal button
② Value Property: Defines values for form elements
③name property: Defines the name of the form element, which is the name of the key when the data is submitted
|
4, <textarea> Tags: define multi-line text input box, and <input> is to define a single line text box;
5, <select> Tags: define the dropdown form elements;
6, <option> Tags: with the <select> tag, define the options in the drop-down form element;
2.2 Inline element tags
1. Hyperlink tag: <a href= "http://www.baidu.com" ></a>; Link to another Web page with inline element basic features, default text blue, underlined
2, inline container label: <SPAN></SPAN>, no default style;
3, Picture Tags: ;
2.3 Common Function tags
1. NewLine Label:<br>
2. Note Label:<!--Comment label--
3. Special characters: -- 空格标签 ;<-- <小于号; >-- >大于号;
To find out all about it, click: W3school-http://www.w3school.com.cn/html/html_doctype.asp
Over~~~~ The following article describes the commonly used CSS style ~ ~ ~
01-html Basic Introduction