Home  >  Article  >  Web Front-end  >  Use of H5 links

Use of H5 links

php中世界最好的语言
php中世界最好的语言Original
2018-04-19 17:12:4015317browse

This time I will bring you the use of H5 links. What are the precautions when using H5 links? The following is a practical case, let’s take a look.

HTML link can be regarded as a manifestation of the vitality of a HTML document. Only HTML links can make the entire HTML document more flexible. You can jump at will and find the content you like. .

HTML uses hyperlinks to connect to another document on the web. Links can be found on almost every web page. Click a link to jump from one page to another.

HTMLHyperlink:

HTML uses the tag 3499910bf9dac5ae3c52d5ede7383485 to set up hypertext links.

A hyperlink can be a word, a word, a group of words, or an image. You can click on these contents to jump to a new document or a certain part of the current document.

When you move your mouse pointer over a link on a web page, the arrow changes into a little hand.

The href attribute is used in the tag 3499910bf9dac5ae3c52d5ede7383485 to describe the address of the link.

By default, the link will appear in the browser as:

An unvisited link appears in blue font and underlined.

Visited links appear purple and underlined.

When you click a link, it appears red and underlined.

Note: If CSS styles are set for these hyperlinks, the display style will be displayed according to the CSS settings.

HTML link syntax:

<a href="url">链接文本</a>

The href attribute describes the target of the link.

Example:

<a href="/"></a>

Implement code display: Visit Yiju Tutorial

The link above can take users to the homepage of Yiju Tutorials.

What we should note here is that "link text" does not have to be text. Images or other HTML elements can become links.

HTML link - target attribute

Using the target attribute, you can define where the linked document should be displayed.

<a href="http://www.php.com/" target="_blank">访问</a>

Define the link as the link homepage, and the target attribute is blank, which means that the link will open the homepage in a new window.

HTML link - id attribute

The id attribute can be used to create bookmark tags in an HTML document.
Tip: Bookmarks are not displayed in any special way and are not displayed in HTML documents, so they are hidden from readers.
Example:

Insert ID in HTML document:

<a id="tips">有用的提示部分</a>

Create a link to the "Helpful tips section (id="tips")" in the HTML document:

<a href="#tips">访问有用的提示部分</a>

Alternatively, create a link to the "Helpful Tips Section (id="tips")" from another page:

<a href="http://www.php.cn/html/html-links.html#tips">
访问有用的提示部分</a>

Things to note:

Note: Always add forward slashes to subfolders. If you write the link like this: href="http://www.runoob.com/html", two HTTP requests will be generated to the server. This is because the server will add a forward slash to the address and then create a new request, like this: href="http://www.111cn.com/html/"

Image link example:

76c82f278ac045591c9159d381de2c57
100db36a723c770d327fc0aef2ce13b1
93f0f5c25f18dab9d176bd4f6de5d30e 
4d0d87937f6c83b675e896c64d3eb7c9 
b2386ffb911b14667cb8f0f91ea547a7)6e916e0f7d1e588d4f442bf645aedb2f 
9c3bca370b5104690d9ef395f2c5f8d1
6c04bd5ca3fcae76e30b72ad730ca86d
e388a4556c0f65e1904146cc1a846bee创建图片链接:
488640cf767a97efdc20f568dcd2c31f
67cc71036babe836bcaf3cc3cccac3e95db79b134e9f6b82c0b36e0489ee08ed94b3e26ee717c64999d7867364b1b4a3
e388a4556c0f65e1904146cc1a846bee无边框的图片链接:
488640cf767a97efdc20f568dcd2c31f
f53d2288983007e7e822d30a5ebb6baa5db79b134e9f6b82c0b36e0489ee08ed94b3e26ee717c64999d7867364b1b4a3
36cc49f0c466276486e50c850b7e4956
73a6ac4ed44ffec12cee46588e518a5e

Out of the box example:

76c82f278ac045591c9159d381de2c57
100db36a723c770d327fc0aef2ce13b1
93f0f5c25f18dab9d176bd4f6de5d30e 
4d0d87937f6c83b675e896c64d3eb7c9 
b2386ffb911b14667cb8f0f91ea547a7 6e916e0f7d1e588d4f442bf645aedb2f 
9c3bca370b5104690d9ef395f2c5f8d1
6c04bd5ca3fcae76e30b72ad730ca86d
e388a4556c0f65e1904146cc1a846bee跳出框架?94b3e26ee717c64999d7867364b1b4a3 
ca21c75a15e42d50348cfc8abd6c698a点击这里!5db79b134e9f6b82c0b36e0489ee08ed 
36cc49f0c466276486e50c850b7e4956
73a6ac4ed44ffec12cee46588e518a5e

The current specified page links to the specified location:

76c82f278ac045591c9159d381de2c57
100db36a723c770d327fc0aef2ce13b1
93f0f5c25f18dab9d176bd4f6de5d30e
4d0d87937f6c83b675e896c64d3eb7c9
b2386ffb911b14667cb8f0f91ea547a76e916e0f7d1e588d4f442bf645aedb2f
9c3bca370b5104690d9ef395f2c5f8d1
6c04bd5ca3fcae76e30b72ad730ca86d
e388a4556c0f65e1904146cc1a846bee
504c4cbc17218479f44e5f1bfe9e8840查看章节 45db79b134e9f6b82c0b36e0489ee08ed
94b3e26ee717c64999d7867364b1b4a3
c1a436a314ed609750bd7c7d319db4da章节 12e9b454fa8428549ca2e64dfac4625cd
e388a4556c0f65e1904146cc1a846bee这边显示该章节的内容……94b3e26ee717c64999d7867364b1b4a3
c1a436a314ed609750bd7c7d319db4da章节 22e9b454fa8428549ca2e64dfac4625cd
e388a4556c0f65e1904146cc1a846bee这边显示该章节的内容……94b3e26ee717c64999d7867364b1b4a3
c1a436a314ed609750bd7c7d319db4da章节 32e9b454fa8428549ca2e64dfac4625cd
e388a4556c0f65e1904146cc1a846bee这边显示该章节的内容……94b3e26ee717c64999d7867364b1b4a3
c1a436a314ed609750bd7c7d319db4dae95dae2588e6a511ff187a778829a59c章节 45db79b134e9f6b82c0b36e0489ee08ed2e9b454fa8428549ca2e64dfac4625cd
e388a4556c0f65e1904146cc1a846bee这边显示该章节的内容……94b3e26ee717c64999d7867364b1b4a3
c1a436a314ed609750bd7c7d319db4da章节 52e9b454fa8428549ca2e64dfac4625cd
e388a4556c0f65e1904146cc1a846bee这边显示该章节的内容……94b3e26ee717c64999d7867364b1b4a3
c1a436a314ed609750bd7c7d319db4da章节 62e9b454fa8428549ca2e64dfac4625cd
e388a4556c0f65e1904146cc1a846bee这边显示该章节的内容……94b3e26ee717c64999d7867364b1b4a3

I believe you are very excited after seeing the examples. Quickly open the editor and take a look.

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

jquery implements select all and inverts single selection

jQuery operates background color gradient animation effect

jQuery plug-in FusionCharts draws pie chart

The above is the detailed content of Use of H5 links. 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