Usage examples of Header tag in HTML

巴扎黑
Release: 2017-06-07 11:40:56
Original
2921 people have browsed it

1. The tag specifies the default address or default target for all links on the page. This includes URLs in , Usage examples of Header tag in HTML, ,

tags.

Html code

<head>  
  <base href="http://www.w3school.com.cn/tags/">   
  <base target="_blank" /> <!--页面中所有target默认为_blank-->  
</head>  
<body>  
  <a href="tag_base.asp">base </a> <br> <!--实际指向http://www.w3school.com.cn/tags/tag_base.asp 且target为_blank -->  
  <a href="tag_audio.asp">audio </a>  
</body>
Copy after login


target optional attributes:
_blank
_parent
_self
_top


2. The tag defines the relationship between the document and external resources. The most common use is to link style sheets.

Html code

<head>  
<link rel="stylesheet" type="text/css" href="theme.css" />  
<link rel="shortcut icon" href="http://jquery.com/jquery-wp-content/themes/jquery.com/i/favicon.ico">  
</head>
Copy after login


rel Optional attributes are:
alternate
author
help
icon
licence
next
pingback
prefetch
prev
search
sidebar
stylesheet
tag


3. defines the document-related Associated name/value pairs, such as descriptions and keywords for search engines and update frequency. The tag has no closing tag, but must be closed properly ().

Html code

<head>  
<meta http-equiv="Content-Type"  Content="text/html; charset=UTF-8" />  
<meta name="keywords" content="HTML,ASP,PHP,SQL">  
</head>
Copy after login

Attributes:

Usage examples of Header tag in HTML

##4.