Home  >  Article  >  Web Front-end  >  Hyperlink tags of commonly used HTML tags_html/css_WEB-ITnose

Hyperlink tags of commonly used HTML tags_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:48:421558browse

Having learned about format tags and text tags before, this chapter starts with learning about hyperlink tags


3. Hyperlink tags

1. Category: Hyperlink tags are divided into relative URLs and absolute URLs

2. Function:

Relative URL: Points to a file within the site (for example: jump to xxx.html)

Absolute URL: Point to another site (for example: jump to http://www.baidu.com)

3. Attribute function:

4. Code example:

<!DOCTYPE html><html>  <head>  <!-- 超连接标签分为相对URL和绝对URL -->    <title>超连接标签</title>		<meta charset="utf-8">    <meta name="keywords" content="keyword1,keyword2,keyword3">    <meta name="description" content="this is my page">    <meta name="content-type" content="text/html; charset=UTF-8">        <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->  </head>    <body>  <a href="Main.html">返回主页</a><br>  	<a href="TagFormat.html" target="_blank">格式标签</a><br><span style="white-space: pre;">  </span>  	<!-- 相对URL -->  	<a href="http://www.hao123.com">hao123</a><br><span style="white-space: pre;">      </span>  	<span style="font-family: Arial, Helvetica, sans-serif;"><!-- 绝对URL --></span><span style="white-space: pre;">  	</span>  </body></html>

5. Running results:

Click the format tag and open the html of the format tag


When you click on the hao123 tag, you will enter this URL


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