HTML - head

HTML <head> element

<Head> element contains all of the elements of the head tag. In the <head> element you can insert scripts (scripts), style file (CSS), and various meta information.

May be added in the head region of the element tag is: <title>, <style>, <meta>, <link>, <script>, <noscript>, <base>.

HTML <title> element

<Title> tag defines the title of different documents.

<Title> in HTML / XHTML document is a must.

<Title> element:

  • It defines the title of the browser toolbar
  • When the page is added to the favorites, displayed in the title favorites
  • Title that appears in the search engine results page

HTML <base> element

<Base> tag describes the basic link address / link target, the label as the default link HTML document all links tags. E.g:

<head>

<base href="http://www.baidu.com/" target="_blank">

</head>

HTML <link> element

<Link> tag defines the relationship between documents and external resources.

<Link> tag is generally used to link to the style sheet:

<head>

<link rel="stylesheet" type="text/css" href="mystyle.css">

</head>

HTML <style> element

<Style> tag defines the style file HTML documents referenced address. In the <style> element you can also add style to render HTML document directly, for example:

<head>
<style type="text/css">
body {background-color:yellow}
p {color:blue}
</style>
</head>

HTML <meta> element

meta tag describes some basic metadata.

<Meta> tag provides metadata. Metadata is not displayed on the page, but will be parsed by the browser.

Last modified META elements are typically used to specify page description, keywords, file, author, and other metadata.

Metadata can be used in browsers (how to display content or reload page), search engines (keywords), or other Web services.

<Meta> General placed in <head> region

<Meta> tag - Example

Defined keywords for search engines:

<meta name="keywords" content="HTML, CSS, XML, XHTML, JavaScript">

Definition describes the contents of a Web page:

<Meta name = "the Description" Content = "Free Web & Programming Guide" >

Define Web page author:

<meta name="author" content="Runoob">

Refresh the current page every 30 seconds:

<meta http-equiv="refresh" content="30">

HTML <script> element

<Script> tag is used to load a script file, such as: js

HTML head element summary

<Head>: Defines the document's information

<Title>: Defines the title of the document

<Base>: The default link address labels custom page link

<Link>: define the relationship between a document and an external resource

<Meta>: defines the metadata in HTML documents

<Script>: defines the client-side scripting files

<Style>: defines the style file HTML document 

  Author: Jeremy.Wu
  Source: https://www.cnblogs.com/jeremywucnblog/
  This article belongs to the author and blog Park total, welcome to reprint, but without the author's consent declared by this section must be retained, and given the apparent position of the article page the original connection, otherwise the right to pursue legal responsibilities.

Guess you like

Origin www.cnblogs.com/jeremywucnblog/p/12089514.html