Where does the head tag in HTML look? Summary of the function of head tag

Source: Internet
Author: User
Tags basic html page html header
This article mainly introduces the role and elements of the head tag in HTML, and explains where the head tag in HTML can be found, so let's take a look at the article.

First, let's see where the head tag in HTML is found.

Head tags are generally written on the top of the HTML file, will not display to the browser, so to find the head tag inside the file, either go to the source file to check, or find the HTML file, the software opened in the inside to see.

Now let's look at the role of the head tag in HTML.

HTML commands can describe text, graphics, animations, sounds, tables, links, and so on. The structure of the HTML consists of the head (head) and the body (body), where the head describes the information required by the browser, while the body contains the specific content to be described.

The basic HTML page starts with the

Title word--sandwiched between

So let's build a simple example, it's very easy. The first step, of course, is to create a new text file (remember, if you are using a more complex word processor, you should use "plain text" or "plain text" to save it) and name it "xxxx.html". (whatever name you have, but remember, use English)

Then you can use the browser to open it, you will see the simplest of the pages you make.

The

1.<title>: Specifies the title of the page.

2.<meta>: Mainly for browser parsing or search engine to provide relevant information.

3.<link>: The introduction of CSS files from outside.

4.<STYLE>: internally defined CSS code.

5.<script>: The introduction of JS files from the outside or directly define the JS code.

6.<BASE>: Sets a baseline link for all links in the current document.

HTML header part of the label, there are many elements, involving the browser to the Web page rendering, SEO and so on, and each browser kernel and the domestic browser vendors have some of their own tag elements, which caused a lot of differences.

In the era of mobile Internet, head header structure, the meta-element of mobile, is more important. The purpose of this article is to understand the meaning of each label and write the head tag that satisfies your needs. This article is based on a hint of the article, which summarizes the meanings of the tags, elements, and usage scenarios in common head.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.