HTML documents consist of two parts: Head (subject part, which is generally invisible) and body (body part, which is visible in the browser ). With the popularity of Visual Web editor such as FrontPage and Dreamweaver (DW), it is no longer a dream to develop a professional webpage without understanding HTML. However, none of these home page creation tools can generate a good topic by themselves, which requires us to understand the elements.
I. Head Element
Meta records information on the current page, such as character encoding, author, copyright, and keywords. It can also be used to provide information to the server, such as the deadline and page refresh interval. The two basic usage methods are as follows: Tell the browser the file type and language type recognized by the web page, and let the search engine search for your web page by keyword.
Attribute specifies whether the meta tag contains name (page description) or HTTP equiv (HTTP title information ). "Value" specifies the type of information provided. Some values have been defined, and DW has a dedicated Property checker. Such as description, keyword, and refresh. You can also specify other values, such as creationdate, Document ID, and level.
Content. If the specified level (level) is value, the content may be beginner (Elementary), intermediate (intermediate), and advanced (advanced ).
Title page title, displayed on the title bar of the browser.
Keywords many popular search engines can automatically read keywords in Meta Tags and use this information to create indexes on the page in their databases. Some search engines have a limit on the number of keywords or characters when creating indexes. Some ignore all keywords when they are out of the limit. Therefore, it is necessary to select keywords for webpages. Use commas to separate the key words in the Fields marked as keywords.
Description and keywords have similar functions. The keyword is replaced by a descriptive statement. Some search engines have certain restrictions on the number of characters when creating indexes. Therefore, try to be concise.
Refresh uses the refresh element to automatically refresh the page after a certain period of time.
Action specifies whether to go to another URL or refresh the current page. To go to other URLs, click the Brower button to select the page to load.
Delay waits in seconds before refreshing the page. to refresh the page immediately, enter 0 in this domain.
Base uses the base element to set the basic URL.
Href specifies the basic URL. You can directly type a path or select a URL.
Target specifies the window to be opened for all links of the document. You can select a framework in the current framework set or in the four retention windows it provides. The default value is _ self.
Link uses the link element to define the relationship between the current document and other files (such as CSS files.
Id specifies the unique identifier of a link.
Title indicates the link. This attribute is suitable for Link style sheets.
Rel specifies the relationship between the current document and the document in the href domain. Possible values include: Alternate (optional), stylesheet (style sheet), start (start), next (next), Prev (previous), content (content) index, Glossary, copyright, chapter, section, subsection, and Appendix), help, And bookmark. To specify multiple links, use spaces to separate values.
Ii. instance description
<Title> highlights of head element usage </title>
<! -- Webpage title -->
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
<! -- The webpage content type, in txt or HTML format. The encoding method is gb2312. -->
<Meta name = "keywords" content = "head element">
<! -- Keyword information -->
<Meta name = "Description" content = "this webpage describes how to use head elements">
<! -- Further description of the website -->
<Meta http-equiv = "refresh" content?5=url=index.htm ">
<! --The web page is automatically refreshed 5 seconds later, and the link address is the index.htm page -->
<Base href = "" target = "_ blank">
<! -- Set the basic link. The target is to bring up a new page. This option can be used to specify the frame displayed by the link on the frame page, for example, target = "Main">
<LINK rel = "stylesheet" href?#homepage.css ">
<! --Import sample table, Chain Sample Table file named "homepage.css ″