a and href attributes HTML uses <a> to represent hyperlinks, which are called anchors in English. <a> can point to any file source: an HTML page, a picture, a video file, etc. Usage is as follows: <ahref="url">Link display text</a> Click the content in <a></a> to open a link file, and the href attribute indicates the path of the link file. For example, if you link to the homepage of jb51.net, you can express it like this: <ahref="https://www.jb51.net">Dotte Software Station jb51.net Home Page</a>target attribute Using the target attribute, you can open the link file in a new window. <ahref="https://www.jb51.net"target=_blank>Dotte Software Station jb51.net Home Page</a> title attribute Using the title attribute, you can display the text annotation of the hyperlink when the mouse hovers over the hyperlink. <ahref="https://www.jb51.net"title="Dotte Software Station Web Tutorial and Code Chinese Site">Dotte Software Station Website</a>If you want the comment to display on multiple lines, you can use as a line break. <ahref="https://www.jb51.net"title="Dotte Software Station Web Tutorial and Code Chinese Site">Dotte Software Station Website</a> name attribute Using the name attribute, you can jump to a specified part of a file. To use the name attribute, set a pair. One is to set the name of the name, and the other is to set an href pointing to the name: <ahref="#C1">See Chapter 1</a><aname="C1">Chapter 1</a> The name attribute is often used to create a table of contents for a large document. A link is created for each chapter and placed at the beginning of the file, and the Name attribute is set at the beginning of each chapter. When a user clicks on a link to a chapter, the content of that chapter is displayed at the top. If the browser cannot find the part specified by Name, it will display the beginning of the article without reporting an error. Link to email address On the website, you will often see a "Contact Us" link. Once you click this link, it will trigger your email client, such as Outlook Express, and then display a new email window. This function can be achieved using <a>. <ahref="mailto:[email protected]">Contact Sina</a> |