Home  >  Article  >  Web Front-end  >  Usage examples of Header tag in HTML

Usage examples of Header tag in HTML

巴扎黑
巴扎黑Original
2017-06-07 11:40:562912browse

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>


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>


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>

Attributes:

Usage examples of Header tag in HTML

##4.

The above is the detailed content of Usage examples of Header tag in HTML. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn