What is the head tag? Introduction to head tag in html

不言
Release: 2018-08-13 17:50:00
Original
4114 people have browsed it

The content of this article is about what is the head tag? The introduction of the head tag in HTML has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

What is the head tag

The head tag is the content of theelement. Unlike the content of theelement, which can be displayed in the browser, the content of the head will not be displayed in the browser. Its function is to contain some metadata of the page. In the example below, head has very little content.

  My test page 
Copy after login
  • Metadata is the data that describes the data.

title

The elementis used to represent the entire Metadata about the approximate content of an HTML document (not the content of the document.) The
elementis also used in other ways. For example, if you try to bookmark a page, (Bookmarks > Bookmark This Page, in Firefox), you will see the content ofas a suggested bookmark.</p>

Metadata

Metadata describes the data data, and HTML has an "official" way to add metadata to a document - the element. Of course, the other things mentioned in this article can also be considered metadata. There are many different kinds of elements that can be included in theelement of your page, but we won't try to explain all of them just yet, as that would just cause confusion.

Copy after login
  • This element simply specifies the document's character encoding - the character set that is allowed to be used in this document. utf-8
    is a universal character set that contains most characters in any human language. This means that your web pages can be displayed in any language; many
    elements contain name and content attributes. The

name attribute specifies the type of meta element; Describes what type of information this element contains.
content specifies the actual metadata content.
These two meta elements are useful for defining the author of your page and providing a description of the page's content.

 
Copy after login
  • Specifying the author can be useful in certain situations: if you need to contact the author of a page to ask questions about the page's content.
    Some content management systems can automatically obtain the page author's information and then use it for certain purposes.
    It is useful to specify a description of the page content that contains keywords about the page content, because it may or may not make your page appear more in relevant searches in search engines (these actions are termed
    Search Engine Optimization, or SEO.)

Add custom icons to your site

Copy after login

Apply CSS and JavaScript to HTML

Copy after login
    The
  • element is often located at the head of the document. It has two attributes, rel="stylesheet", indicating that this is the style sheet of the document, and
    href, which contains the style sheet file. path. The

Copy after login
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!