html link tag

无忌哥哥
Release: 2018-06-29 09:56:43
Original
1806 people have browsed it

1. Many friends, the first impression of the Internet may be that there are many pages on the website that can be opened with one click

2. What you click may be a title text, or it may be a A picture, a button, but in essence it is just a link

Here we go to the homepage of php Chinese website to experience it, you can see that links are everywhere, without links there would be no Internet

3. The link tag is , and its most important attribute is href, which is the address to be jumped.

The target attribute has other values ​​besides the _blank value, which can be set to open in a new window. You can set the opening method of the link

_self: The current window, I just saw it, this is the default value, if you don’t write it, it is it

_parent: The parent window of the current window

_top: The top window

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>5.链接标签</title>
</head>
<body>
<a href="http://www.php.cn/course/892.html" >第二期全栈开发培训班直播课堂实录</a>
<!-- 这时你点击,会发现这个链接会在当前窗口打开,如果你在一个新窗口打开这个页面,怎么办?可以给链接添加一个新属性: target -->
<hr>
<a href="http://www.php.cn/course/892.html" target="_blank">第二期全栈开发培训班直播课堂实录</a><em>我会在新窗口打开哟</em>
<hr>
<!-- <a>标签的功能不仅可以跳转到站外地址,还可以在本站内进行跳转,我们可通过添加锚点来实现 -->
<a href="#title">315晚会刚结束 多家被曝光的企业就被查处</a>
<div style="height:1000px"></div>
<h3 id="title">315晚会刚结束 多家被曝光的企业就被查处</h3>
<p>
<strong>大众道歉了!今日起,对问题“途锐汽车” 开设一对一处理“专属通道”!</strong><br>
“3⋅15”晚会报道了关于大众进口汽车途锐的车辆问题,节目播出2个小时后,大众汽车在@大众进口汽车,作出声明。大众汽车表示,他们高度重视并充分意识到在处理客户诉求过程中仍存在诸多不足,同时对因相关途锐车辆空气滤芯进水问题,给车主造成的不便及困扰再次表示诚挚的歉意。针对上述缺陷问题,大众汽车日前已向国家相关部门备案了召回计划,并将于4月30日正式开始实施,并将于今日起开设一对一处理“专属通道”。
</p>
</body>
</html>
Copy after login

The above is the detailed content of html link tag. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template