Front-end development: html-Head

Source: Internet
Author: User

HTML

The

Elements that can be added to the head area are labeled: <title>, <style>, <meta>, <link>, <script>, <noscript>, and < Base>.

<title> tags define the titles of different documents.

<title> is required in the html/xhtml documentation.

<title> elements:

    • Defines the title of the browser toolbar
    • Titles that appear in favorites when a page is added to a favorite folder
    • Title displayed on the Search engine results page

A simple HTML document:

<! DOCTYPE html>
HTML <base> Elements

The <base> tag describes the basic link address/link target, which is the default link for all the link labels in an HTML document:

<base href= "www.baidu.com/" target= "_blank" >
HTML <link> Elements

The <link> tag defines the relationship between the document and the external resources.

<link> tags are typically used to link to style sheets:

<link rel= "stylesheet" type= "Text/css" href= "Mystyle.css" >
HTML <style> Elements

The <style> tag defines the style file reference address for the HTML document.

In the <style> element you can also add a style directly to render the HTML document:

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

  

HTML <meta> Elements

The META tag describes some basic meta-data.

The <meta> tag provides metadata. The metadata is also not displayed on the page, but is parsed by the browser.

Meta elements are typically used to specify the description of a Web page, keywords, last modified time of the file, author, and other meta-data.

Meta data can be used for browsers (how to display content or reload pages), search engines (keywords), or other Web services.

<meta> generally placed in

<meta> Tags-usage examples

Define keywords for search engines:

<meta name= "keywords" content= "html,css,xml,xhtml,javascript" >

 

Define a description for a Web page

<meta name= "description" content= "Free web & Programming Tutorials" >

  

Define page Authors
<meta name= "Author" content= "Runoob" >
Refreshes the current page every 30 seconds
<meta http-equiv= "Refresh" content= "5" >

  

HTML <script> Elements

The <script> tag is used to load script files, such as: JavaScript.

The <script> elements are described in detail in a later chapter.

HTML Head Element

Front-end development: html-Head

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.