It is no exaggeration to say that hyperlinks connect the entire Internet. A hyperlink can point to almost any resource on the Internet, such as another web page, a picture, an MP3 song, etc. The syntax for creating a hyperlink using XHTML is very simple, requiring only a pair of <a></a> tags: <a href="URL that this hyperlink will point to">Text or image that will be displayed on the page</a> For example: <a href="https://www.jb51.net/">123WORDPRESS.COM</a> It will be displayed as a hyperlink in the browser, and clicking it will take you to 123WORDPRESS.COM (https://www.jb51.net/). The effect is as follows: 123WORDPRESS.COM The href attribute in the <a> tag is the address that the hyperlink points to. It can be a general URL or an email address. In a later practice example, we will create a hyperlink pointing to an email address. The content (elements) between <a> and </a> will be displayed as a hyperlink on the web page. Note that when the href attribute value is a general URL (absolute path), the "http://" cannot be omitted, otherwise the browser will recognize it as a relative path. The difference between absolute paths and relative paths is beyond the scope of this XHTML tutorial. If you don't understand, you can search for relevant information on Baidu. Hyperlinks (anchors) to jump to within a page When you browse other websites, you may have noticed that there are some hyperlinks that allow you to return to the top of the page or to any other location within the current page. Like the link below: Back to the title <br />The implementation method is as follows. First, add the following code to the title. : <h1>XHTML Beginner's Guide - XHTML Hyperlinks<a id="biaoti"></a></h1> The code for the hyperlink itself is: <a href="#biaoti">Back to title</a> Page jumps allow your users to quickly find the information they need when there is a large amount of content on your page. Usually it is used as a directory in some explanatory web pages. Link Exercise The following exercise adds a hyperlink to the previous "index.html". Open "index.html" and modify the code as follows: <html> The intermediate code is omitted... <p><a href="mailto:[email protected]">Contact me</a></p><!-- Note that you need to change the email address to your own--> <p>Copyright©2005-2006XXX Copyright No</p> </body> </html> After saving, browse your own web page and make sure that your web page is the same as this page. Click on the newly created link. If you have installed email management software such as Outlook, an interface for sending emails to yourself will open. |
<<: Detailed explanation of MYSQL character set setting method (terminal character set)
>>: Detailed explanation of the process of creating floor navigation effects with JavaScript
This command modifies the data table ff_vod and a...
<br />The website access speed can directly ...
I learned a new trick today. I didn’t know it befo...
Note When developing an article display list inte...
Table of contents 1. Cause 2. Equipment Informati...
Create docker-compose.yml and fill in the followi...
Table of contents JSON.parse JSON.parse Syntax re...
This article mainly introduces an example of how ...
Table of contents 1. Installation 2.APi 3. react-...
Table of contents 1. Download nodejs 2. Double-cl...
Table of contents 1. Installation 2. There is no ...
1. IT Mill Toolkit IT Mill Toolkit is an open sou...
need Add a paging bar, which can jump to the page...
The img tag in XHTML should be written like this:...
Configure service startup and shutdown in Linux s...