HTML Basics<! The doctype> statement helps the browser to display the Web page correctly. The Modern websites use meta to declare the encoding format of page content, and we recommend this approach:<meta http-equiv= "Content-type" content= "text/html; CHARSET=GBK" >Reference:
head Element (head) and the child elements it contains
<title> defines the document title. <title> tags define the title of the document. The title element is required. The title element is able to: define the caption in the browser toolbar. Provides the caption that is displayed when a page is added to a collection. The page title that appears in the search engine results. <base> defines the default address or default destination for all links on the page. attribute href: Specifies the base URL of the relative URL in the body target: tells the browser how to open the URL <link> defines the relationship between documents and external resources. attribute href: The location of the linked document. rel: The relationship between the linked document and the current document (only the "stylesheet" of the Rel attribute is worth the support of all browsers.) The other values are only partially supported. )type: The MIME type of the document being linked. |
<meta> defines metadata about an HTML document. meta Data (metadata) is information about the data. The <meta> tag provides metadata about the HTML document. The metadata is not displayed on the page, but is readable for the machine. Typically, the meta element is used to specify the description of the page, the keywords, the author of the document, the last modification time, and other metadata. The <meta> tag is always in the head element. Meta data can be used in browsers (how to display content or reload pages), search engines (keywords), or other Web services. <script> define client script. <style> Define style information for a document ... <style> tags are used to define style information for HTML documents. You can specify the style that the HTML element renders in the browser within the STYLE element: property type: Specifies the MIME type of the style sheet. Media: Specifies a different media type (device type) for the style sheet. |
<body> elements:
elements that mark text
----------------------------Split Line--------------------------------------
Meta http-equiv Attribute Details
- Http-equiv, as the name implies, is equivalent to the HTTP file header function, it can send back some useful information to the browser to help correct and accurate display of the content of the Web page, and the corresponding property value of content,content content is actually the variable value of each parameter.
The Http-equiv property syntax format for referencing the meat tag is: <meta http-equiv= "parameter" content= "parameter variable value", where the Http-equiv attribute mainly has the following parameters:
1. Expires (term)
Description: Can be used to set the expiration time of a Web page. Once the page expires, it must be retransmitted to the server.
Usage: HTML code
-
Note: The time format of GMT must be used.
2. Pragma (Cache mode)
Note: is used to set the browser from the local computer cache to access the content of the page, once left the page can not be recalled from the cache
Usage: HTML code
-
Note: This setting makes it impossible for visitors to browse offline.
3, Refresh (refreshed)
Description: Automatically refreshes and points to the new page.
Usage: HTML code note double quotation marks
-
Note: 2 of these are meant to be automatically refreshed to URL URLs after 2 seconds of stay.
4. Set-cookie (Cookie setting)
Note: If the page expires, the cookie will be deleted.
Usage: HTML code
-
Note: The time format of GMT must be used.
5, Window-target (display window settings)
Description: Forces the page to appear on a separate page in the current window.
Usage: HTML code
-
Note: Used to prevent others from calling their own pages in the frame.
6, Content-type (display character set settings)
Description: Sets the character set used by the page.
Usage: HTML code
-
7, Pics-label (Web level evaluation)
Usage: HTML code
- <meta http-equiv= "Pics-label" contect= "" >
Description: There is a content setting in Internet Options for IE that prevents you from browsing some restricted sites, and the limit level for websites is set by the meta attribute.
8, Page_enter, Page_exit
Set special effects HTML code when entering a page
- <meta http-equiv= "Page-enter" contect= "Revealtrans (duration=1.0,transtion=)" >
Set special effects HTML code when leaving a page
- <meta http-equiv= "Page-exit" contect= "Revealtrans (duration=1.0,transtion=)" >
The value of duration is the time, in seconds, that the page dynamically transitions.
Transition is the transition mode, which has a value of 0 to 23, corresponding to 24 transition modes respectively. As the following table:
0 box-shaped contraction 1 box-shaped radiation
2 round contraction 3 round emission
4 from bottom to top 5 up down
6 from left to right 7 right to left
8 Vertical Blinds 9 Horizontal Blinds
10 Horizontal Lattice Blinds 11 Vertical lattice Blinds
12 free dissolve 13 from the left and right sides to the middle expansion
14 expand from middle to left, 15 from upper and lower ends to center
16 Expand from middle to bottom 17 from the upper right corner to the bottom left
18 from the lower-right corner, expand 19 from the upper-left corner to the lower-right corner
20 Expand 21 horizontal lines from the lower-left corner to the upper-right corner
22 Vertical Linear Expansion 23 randomly produces a transition pattern
9, clear the cache (re-visit this site to re-download!) )
HTML code
- <meta http-equiv= "Cache-control" content= "No-cache" >
10, set the expiration time of the webpage
HTML code
- <meta http-equiv= "Expires" content= "0" >
11, keywords, for the search engine
HTML code
- <meta http-equiv= "keywords" content= "keyword1,keyword2,keyword3" >
12. Page description
HTML code
-
- <meta http-equiv= "description" content= "This is my page" >
The meat tag's NAME variable syntax format is: <meta name= "xxx" content= "xxxxxxxxxxxxxxxxxx" > where xxx mainly has the following parameters: 1. Keywords (keyword) Description: Keywords is used to tell the search engine what your page's keywords are. Example: <meta NAME = "keywords" content= "life, Universe, mankind, plants, relationships, the meaning of Life, science" > 2.description (Introduction) Description: Description is used to tell the search engine the main content of your website. Example: <meta name= "description" content= "This page is about the meaning of life, the universe, mankind and plants." > 3.robots (Robot Wizard) Description: Robots is used to tell the search robot which pages need to be indexed and which pages do not need to be indexed. The content parameters are all,none,index,noindex,follow,nofollow. The default is all. Example: <meta name= "Robots" content= "None" > 4.author (author) Description: Example of the author of the callout page: <meta name= "Author" content= "Ajie,[email protected]" > These are some of the basic uses of META tags, the most important of which are: keywords and description settings. In addition, in order to improve the search click-through rate, there are some "devious": 1. To increase the density of keywords, the keywords are hidden in the page (the text color is defined as the background color). 2. Add keywords to the ALT comment statement in the image. such as: 3. Use HTML comment Statements to add a large number of keywords to the page code. Usage: <!---INSERT keyword here--->
|
HTML5 Basics and Meta HTTP-EQUIV attributes