Chapter 4 HTML webpage header tag
Key points of this Chapter
Title Tag and Its Attributes
Base tag and Its Attributes
Meta tag and Its Attributes
Link tag and Its Attributes
STYLE tag and Its Attributes
Script tag and Its Attributes
Directory:
3.1 title tag and Its Attributes
3.2 base tag and Its Attributes
3.3 meta tag and Its Attributes
3.4 link tag and Its Attributes
3.5 STYLE tag and Its Attributes
3.6 script tag and Its Attributes
3.7 comprehensive instances
3.1 title tag and Its Attributes
<Title> A tag is a page title tag. It displays the title of the HTML file in the title bar of the browser to describe the purpose of the file. This tag can only be used between the tag
<Title> the tag format is as follows:
<Title> file title </title>
<Title> the title of the HTML file is a summary of the file content. A good title should allow the reader to determine the approximate content of the file. The file title is generally not displayed in the text window, but in the window name. Each document can have only one title.
3.2 base tag and Its Attributes
<Base> A tag is a base URL tag and a single tag in HTML. This tag is used to change the parameter values of all link tags in the file. It can only be used between <Base> the tag format is:
<Base property = property value/>
In HTML, the <base> TAG provides two basic attributes:
1. href attributes
Set the prefix of the link address to specify the Reference URL of the page Link.
2.tar get attribute
This property sets the window displayed in the file, specifying the page opening mode of the link. In HTML, new window (_ blank), original window (_ Self), parent window (_ parent), and outermost window (_ top) can be selected based on actual needs) four open methods.
3.3 meta tag and Its Attributes
<Meta> A tag is a metadata tag and a single tag in HTML. This mark can be reused in the header mark to indicate the author of the webpage, the webpage creation tool, the keywords contained, and other information about the webpage. Another function is to create an HTTP Response Header so that the browser can know how to process the webpage. For example, when the webpage expires, and how many times it is automatically refreshed.
<Meta> the tag format is as follows:
<Meta property name = property value>
Common attributes are as follows:
1. the name attribute provides a name for the name/value pair in the <meta> tag.
2. the http-equiv attribute indicates that the document header to be sent to the browser before the server sends the actual document contains the name/value pair.
3. The content attribute provides the value in the name/value pair for the <meta> tag. The content attribute must always be used with the name or http-equiv attribute.
3.4 link tag and Its Attributes
<Link> A tag is an association tag and a single tag in HTML. Defines the relationship between the current document and other documents in the Web set and establishes a tree link organization. <Link> the tag does not actually link to the file, but provides a path to link to the file. Link tags are most commonly used to link CSS style sheet files.
<Link> the tag format is as follows:
<Link property = property value>
3.5 STYLE tag and Its Attributes
<Style> A tag is a style tag. It is a double tag in HTML that defines style information for HTML documents. <Style> the element is located in the head section. You can use the <style> label to specify how HTML documents are presented in a browser. Almost all browsers support the <style> label.
<Style> the tag format is as follows:
<Style property = property value> style content </style>
3.6 script tag and Its Attributes
<SCRIPT> A tag is a script tag. It is a double tag in HTML that defines client script information for HTML documents. This tag can contain a client script in the document (the client script enables the document to better respond to client events, which can be anywhere in the document, but it is often located in the
3.7 comprehensive instances
This section describes the design of an HTML document header Based on the Content learned in this chapter.
To design an HTML document header, you must set the character set for the page; Set keywords for search engine search; Set webpage information to tell the search engine the main content of the site; ability to call external style sheets and load script files in the header.
Summary
The HTML header is Title tag <title>
Base URL tag <base>
Meta Information Mark <meta>
Base link tag <link>
Define document STYLE tag <style>
Define client script tag <SCRIPT>
These tags are mainly used to set some basic information about the page, such as the page title, Brief description of the page content, define the page keywords, define the document style sheet, and insert a script language program. In general, content in the header is not directly displayed on the webpage, but is used inside the browser.