In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to use the head tag of html5". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to use the head tag of html5".
The head marks of html5 are: 1, "; 2,"; 3, "; 4,"; 5, "; 6,"; 7, "; 8,".
The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.
The head mark of html5
1. Label
Tags are containers for all header tags, which are used to define metadata about HTML documents (data that describes the data) and references to required resources (such as CSS style files, JavaScript script files), which play a very important role in the correct display of the document in the browser. Depending on our requirements, a large amount of metadata can be defined in the HTML header, or there can be little or no definition at all. Although the header tag is part of the HTML document, the contents are not displayed in the browser.
....
2. Label
Tags are used to define the title of an HTML document, and only a document that contains tags is a valid HTML document. In addition, only one tag is allowed in an HTML document, and the tag must be placed in the tag.
Note that only plain text content is allowed inside the tag, not other HTML tags.
The main purpose of the label is as follows:
Display the title in the browser title bar or taskbar
Provide a title when adding a page to your favorites (bookmark)
Displays the page title in the search results.
The following example shows how to use tags in an HTML document:
-tutorial _ manual _ video-free php online learning platform
The content of the tag must be related to the current document and should not be too long. Please try to limit the Chinese page to 30 characters (including spaces).
3. Label
The tag is used to specify a base link for all relative links on the page, and when you set the basic link, all relative links on the current page are prefixed with this basic link, as shown in the following example:
Tag demo video tutorials getting started
In the above example, the hyperlink in the first tag will be resolved to "https://www.yisu.com/course.html", and the hyperlink in the second will be resolved to" https://www.yisu.com/course/type/3.html".
Note that tags in HTML documents must appear before any tags that reference external resources, and only one tag is allowed to be defined in an HTML document.
4. Label
Tags are often used to reference external CSS stylesheets, and the tags contain two main attributes, rel and href. The rel attribute is used to indicate the type of reference file, and the href property is used to set the path to the external file. The sample code is as follows:
Write the title here
HTML tags can contain any number of tags.
5. Label
Using tags, you can embed CSS styles in an HTML document, and it is important to note that the styles defined in the tags are valid only for the current HTML document. The sample code is as follows:
Write the title body {background-color: YellowGreen;} H2 {color: red;} p {color: green;} here
Note: tags can be used for unique styles in a document, but external style sheets are more appropriate for styles that are common in multiple documents. For more information about embedding CSS in HTML, go to "HTML embedding CSS style (four ways)."
6. Label
Tags are used to provide metadata about HTML documents, such as page validity, page author, keyword list, page description, and so on. The data defined by the tag is not displayed on the page, but it is parsed by the browser.
1) define the character set
The charset property is used to specify the character encoding of the HTML document. In the above example, we set the character encoding of the document to "UTF-8".
2) define the page description
Defining the description information of the page is beneficial to the search of search engines.
The tag defines the document title, and the name= "description" defines the document description, which is usually longer than the title.
3) define keywords
Keywords are used to provide search engines with page-related information.
4) define the author of the page
Author information can be extracted automatically through some content management systems.
5) refresh the page
The code in the example above is used to send an instruction to the browser to automatically refresh the page after a specified interval of 30 seconds. In addition to specifying the time interval, you can also specify a link in the content attribute, where the page will be redirected to the page that the link points to after the specified time, as shown in the following example:
7. Label
The tag is used to define the JavaScript script. The sample code is as follows:
[xss_clean] (")
8. Label
When the user's browser does not support JavaScript scripts or disable JavaScript scripts, you can define something in the tag to replace JavaScript scripts that cannot be run or give the user some hints. In addition to tags, you can include any HTML element in the tag, as shown in the following example:
Your browser does not support JavaScript or you have disabled JavaScript, please click here to learn how to enable JavaScript.
Thank you for reading, the above is the content of "how to use the header tag of html5". After the study of this article, I believe you have a deeper understanding of how to use the header tag of html5, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.