This site has been taken over by the staff of www.ASPDeveloper.Net

Please report errors to suggest@aspdeveloper.net

BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
XHTML
Wrapping several generated XHTML pages inside one reusable XHTML frame
<< XALAN
XML DOM >>

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :3603

 

The <a> Tag (XHTML Reference)

Introduction

The <a> tag is used to display links. A link is always required if you are working with WebPages. You can link in two ways with that tag. For example you can link to another page, or you can link to the same page but to another section.

Example

This example links to another page. You can replace the “index.html” with whatever file you like as long as it in the same path. If it is in another path, then you will also have to provide the path.

<a href=”index.html”>Home</a>

To create a link which just points to another section within the same page, you have to create anchors. An anchor looks like this:


<a name=”top”>Welcome to…</a>

As you can see I have used the name attribute in that tag and not the href attribute. This way it will be known as an anchor. Furthermore this will not be converted to a visible link like you have seen in the first example. You can imagine this as a simple marker. We can then use the following link which will jump to the top (Welcome to…) section.

<a href=#top>Jump to top</a>

Working example

<a href="a.html">Home</a>

<p>Here we are going to explain the usage of the &lt;a&gt; tag. We will cover this and this and this....<br/><br/><br/><br/><br/><br/><br/><br/><br/>

Scroll down and press the link below.

<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></p>

<a href=#top>Jump to top</a>

Output

Construction

The <a> tag contains many attributes and events. Here is a list of available attributes and events.

Attributes

Name:

Description:

Href

Target URL.
Can be any internet address which starts with: http, ftp, telnet, mailto, etc.

Target

Target Frame to load the page into. Can be one of the following:

_blank = new window
_self = same window

_parent = parent window
_top = url will be opened in full body of the window

Keyboard

accesskey

Defines an alphabet for the keyboard shortcut. You can use ALT + alphabet.

tabindex

Defines the number of the index. The lowest number will be jumped first and highest later.

Language

charset

Defines the character coding of the target url or writes a page on charset.

hreflang

Defines the language. You have to provide the language code. Here are some codes:

de = German
en = English
en-us  = English (USA)

en-uk = English (UK)

es = Spanish

fr = French
it = Italian

Logical references to target for rel/rev:

With the attribute rel (relationship) you can specify a relationship to the target. The rev attribute (reverse) specifies a reverse link from the target document to the current document. These attributes are used by search engines to provide a linked navigation menu. Both attributes can have one of the following values:

appendix

Reference to the appendix page of the document.

Example:

<a href=”appendix.html” rel=”appendix”>

alternate

Reference to a alternative source.

Example:
<a href=”AltChapter1.html” rel=”alternate”>

bookmark

Reference to a bookmark. Many web blogs use this value in a link to show a permanent link which can be bookmarked.

Example:
<a href=”a href=”index.html” rel=”bookmark”>

chapter

Reference to a chapter from the current listed documents.
Example:
<a href=”chapter.html” rel=”chapter”>

contents

Reference to the table of contents in the current document.
Example:

<a href=”toc.html” rel=”contents”>

copyright

Reference to copyright or the policy of the current document.

Example:

<a href=”copyright.html” rel=”copyright”>

glossary

Reference to glossary page of the document.

Example:

<a href=”glossary.html” rel=”glossary”>

index

Reference to the index page of the current document.

Example:

<a href=”index.html” rel=”index”>

next

Reference to next page from the current document.

Example:

<a href=”chapter2.html” rel=”next”>

prev

Reference to the previous page from the current document.

Example:
<a href=”chapter1.html” rel=”prev”>

section

Reference to a section in a list of documents.

Example:
<a href=”index.html#section” rel=”section”>

start

Reference to the first page of the current documents. Search engines can use this to show the first page.
Example:

<a href=”index.html” rel=”start”>

subsection

Reference to a sub-section in a list of current documents. ( Note that a section can have multiple sub-sections)

Example:
<a href=”index.html#subsection” rel=”subsection”>


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

Software Specialist, Linux - Finlan
Linux Core Technical Project Manage
Graphics designer at Tanzania. Expe
Integration Specialist Needed - Wor
Virtualization Server Infrastructur

View all Jobs (Add yours)
View all CV (Add yours)






    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP