Commonly used labels for HTML5

HTML5 HTML4 contrast added a lot of elements, but also removed some elements (can be replaced with css stylesheets way) so I only listed a few of the most commonly used HTML5 tags.

head tag:

<meta http-equiv = "X -UA-Compatible" content = "IE = IE9; IE = IE8;"> met the old version of the browser, such as ie6, add this code it is compatible with the 

<meta name = "keyword "content =" a prosperous, democratic, civilized and harmonious "> this is a keyword tags, keyword settings page helps search engines find and classify the pages, it can increase the chances of search. There can be multiple keywords separated by commas. 
<meta name = "description" content = " website of socialist core values"> This is a page describing the subject matter, but also to facilitate the search search engines. 
<meta name = "other" content = "other description"> common format. 

<meta http-equiv = "refresh " content = "5"> refresh indicates refresh, content represents a refresh interval. 
<meta http-equiv = "refresh " content = "5"; url = "www.baidu.com"> refresh expressed refresh, content represents the refresh interval, url represent about to jump refresh address. 

<title> I am a HTML page <title /> This is a title tag, when you open multiple pages can know the content of the page you open title. Or open the Favorites page in the collection can be a fancy page that you want to open.

 

the body tag:

<a href="www.baidu.com"> I Baidu search the address link </a> This is a hyperlink label, so that visitors to jump from one page to another page 
<a href = "filename" > I was a file </a> this is a hyperlink label, so that visitors from one page to jump to a file (if the link in the input file name under the same parent directory, you want to link to the previous level to enter. " ./ "and then enter the directory name, file name, you want to link to the next to enter the directory name and then enter the file name) 
<a href="#当前文件的某个id"> I will jump to </a> a when using an anchor tag, id not allowed to repeat 
<a href="文件名" target="目标窗口的打开方式"> I am a </a> target file is opened in a new window _blank 

<the p-> paragraph text </ p> paragraph tag label (tag block level), opening a paragraph, and paragraph between paragraphs have characteristics :( break tag) 
a newline tag, and force a line :() 
<h1 of> </ h1 of> title tag (block-level tag), respectively corresponding to six kinds of titles 1-6 different titles, and gradually decreases. Features :( increase bold) 

<span> </ span> Inline tags, characteristics :( whiteboard, css style may be added to change the style of the text) 
<div> </ DIC> tag segment (block-level tag) represents a HTML displayable area, for setting the characters, images, forms, etc. placement

 

 List / Form:

Unordered list -ul 
<UL type = ""> type taken (Disc as filled circles), type taken (circle of open circles), type taken (solid squares Square) 
  <Li> first </ Li> 
  <Li> The second </ Li> 
  <Li> third </ Li> 
</ UL>
Ordered list OL 
<OL tyoe = "" Start = ""> type taken (a digital 1234) type taken (a letter abcd) type taken (A letters ABCD) type taken (i Roman numerals i, ii, iii) type take (I digital I, II, III), start from the value which represents the start from the beginning if you do not want to say. 
  <li> first </ Li> 
  <li> second </ Li> 
  <li> third </ Li> 
</ OL>
Definition list DL 
<DL> 
  <dt> first </ dt> 
    <dd> my name <dd> dd indent having effect 
</ DL> 

Table Table 
<table border = "1"> tag table, border = " 1 "(create border) 
  <thead> 
    <TR> tag line 
      <th> row I of the first header </ th> header (bold) 
      <th> row of the second header I is </ th > 
    </ TR> 
  </ thead> 
  <tbody> 
    <TR> 
      <td> I is the first cell of the second row </ td> cell marker 
      <td> I is the second line of the second cell </ TD> 
    </ TR> 
    <TR> 
      <TD> I is the first cell of the third row </ TD> 
      <TD> I is the third line of the second cell </ TD> 
    </ TR> 
  </ tbody > 
</ Table> 
# colspan = ". 1" to the right merging a cell 
# rowspan = "1" merge one cell down

 

 

  In HTML, <form> </ form> tag is used to create a form, i.e. the definition of the start and end positions of the form, the form of the real data processing program or a script in the action attribute, this value may be a program or script the complete url

grammar:

< "a complete url program or script" form action = method = "transmitted in the form of" name = "convenient backstage to find the form"> form # transmission has post, get (get faster than the post, get data will be added to and transmitting the post is separated from the transfer url url) 
  form controls 
</ form>

 

The input control 
<input type = "text" name = " name text field, not contain special characters" size = "length of the text box displayed on the page" maxlength = "maximum number of characters that can be entered in the text box" value = " "enter any text, numbers, letters /> text attribute is used to set the text field in the form of default values defined in the text box 
<input type =" password "name =" "..... /> password property makes enter the text to the text field are **** or dot display. 
<input type = "radio" value = " radio button values" name = "name of the radio buttons" checked = "checked" /> radio button displayed in a round box. checked attribute indicates the radio button is selected by default. 
<input type = "checkbox" value = " checkbox value" name = "name checkbox" checked = "checked" /> checkbox. 
<input type = "button" value = " button values" name = "name of the button" onclick = "handler" /> Text # onclick push button, value setting button = "the window.close ()" 
<INPUT type = "

<input type = "image" src = " Image Address" name = "Image Name" alt = "" title = " " /> Add a picture 

file controls 
<input type = "file" name = "" /> upload files, dependent enctype form a form attribute = "multipart / form-data"

 

Menu / list control 
<select name = "Name drop-down menu"> 
  # <optgroup label = ""> grouped 
    <option value = "list item" name = "menu and list of names" multiple = "list item multiple choice" size = "shows the number of list" Selected = "Selected '> </ Option> 
    <Option value =" list of items "> </ Option> 
    <Option value =" list of items "> </ Option> 
</ SELECT>

 

Multi-line text entry box 
<textarea name = "" value = " text field Default" rows = "number of text fields" cols = "Domain column of text"> SUMMARY </ textarea>

 

Where the submission of data to give back only form tags and labels textarea

 

 

HTML tags Summary: https: //developer.mozilla.org/zh-CN/docs/Web/Guide/HTML/HTML5/HTML5_element_list

HTML symbols Summary: https: //blog.csdn.net/Iversons/article/details/78996776

Guess you like

Origin www.cnblogs.com/sunchao0709/p/11452231.html
Recommended