Change Font Size:

XHTML Tutorial - hyperlinks

Hyperlink is an important part of a web site, but also XHTML and the essence of the Internet

The handbook after more closely linked, we recommend that you read from the first quarter onwards.

Hyperlink <a> Tags

It is no exaggeration to say that is a hyperlink to connect to the Internet. Hyperlinks can be at almost any resource on the Internet, such as another page, a picture, an MP3 songs, and so on. The use of hyperlinks to establish XHTML syntax is very simple and only requires a Comment on "a> </ a> tag can be:

<a Href="This will be a hyperlink to the Web site at" /> pages will be shown in text or pictures </ a>

For example:

  <a Href="http://www.nt22.com/" /> NT22 </ a> 

Will be displayed in a browser. As a hyperlink, click it will enter NT22 (http://www.nt22.com/). Results are as follows:

NT22

One <a> tag in the href attribute this is the hyperlink pointing to the address, she is the general site also can be e-mail address, in the later practice examples, we will create an e-mail address at the hyperlink. <a> And </ a> between content (elements) will be used as the hyperlink displayed on the website. Attention to the href attribute values for the general web site (absolute path), "http://" can not be omitted, otherwise it will be the browser to identify as a relative path. Path absolute and relative difference between the path of the XHTML version is not within the scope of the discussion.

Jump Page hyperlinks (Anchor Kee)

You are visiting other sites when it may be noted that, there are some hyperlinks allow you to return to the page or the top of the current page in any one place. Below links like this:

Heading back

The method is as follows, first of all, in the heading, add the following code. :

<h1> XHTML Tutorial - hyperlink <a id = "biaoti" /> </ a> </ h1>

And hyperlinks to their own code:

<a Href="#biaoti" /> return to the title </ a>

Jump in the pages of your page with a lot of content, so that your users can quickly find the information they need. Under normal circumstances, are illustrative of the website to use directory.

Links to practice

Below practice in before "index.html" add hyperlinks. Open "index.html", the code to do the following modifications:

  <html> Intermediate code omitted... <p> <a href="mailto:xxx@xxx.com" /> contact me </ a> </ p> 
<p>Copyright&copy;2005-2006XXX some copy right </p> </body> </html> <! - Attention to the e-mail address should be your own -> <p> Copyright © Copyright 2005-2006XXX not </ p> </ body> </ html>

After the visit to preserve their own web pages, make sure your Web pages with the same. Click to create new links, if you install the Outlook e-mail, such as management software, will open a given its own interface of the email.

Enter the next section: XHTML Directory - List