[bcab] Re: html coding
- From: "Colin Fowler" <col.fowler@xxxxxxxxxxxxxx>
- To: <bcab@xxxxxxxxxxxxx>
- Date: Fri, 30 Jan 2009 08:25:59 -0000
Hi,
Thanks to everyone for the previous help on this subject.
I've another question now, how would I code a link to another page so that it
lands exactly on the content within that page that I want to direct it to?
Thanks once more
Colin Fowler
----- Original Message -----
From: Léonie Watson
To: bcab@xxxxxxxxxxxxx
Sent: Thursday, January 08, 2009 8:01 PM
Subject: [bcab] Re: html coding
This is just the place for these kind of questions. I know others have
suggested other lists, so I'll jump straight to some code examples instead.
There are two parts to a skip link:
- The skip link itself.
- The place on the page that it leads to.
The code to create the skip link looks like this:
<a href="#content">Skip to content</a>
It looks like a normal link, except that it doesn't include a web address
within the href="". Instead, it uses a hash sign followed by the word content.
The hash sign is important. That's the part that informs the browser that
the destination of the link is on the same page, not a different page
altogether.
The code to indicate the destination of the link is always used in
conjunction with another HTML tag. On its own, it looks like this:
id="content"
For example, you may have a heading at the start of your content area. If
so, the above bit of code would be used like this:
<h1 id="content">Welcome to my website</h1>
Alternatively, you may want the link to lead to the first paragraph in
your content. The code would look like this:
<p id="content">This is the first paragraph of text in my content...</p>
There are two useful things to remember about this technique:
1. The word after the hash sign in the skip link, and the word inside the
id="", should match exactly.
2. Each id="" on a page should be unique, in part to prevent multiple skip
links on the same page from getting scrambled.
Hope this all makes sense. Let me know if you need any more information.
Léonie.
--
http://www.tink.co.uk/
------------------------------------------------------------------------------
From: bcab-bounce@xxxxxxxxxxxxx [mailto:bcab-bounce@xxxxxxxxxxxxx] On Behalf
Of Colin Fowler
Sent: 08 January 2009 13:38
To: bcab@xxxxxxxxxxxxx
Subject: [bcab] html coding
Hello,
I am a newby at this, so please cut me some slack.
Does anyone have the html tag for a skip to main content link please?
If anyone knows of a better E mail list for me to be directing my enquiries
to, I would be grateful for that signposting.
Thanks
Colin
------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.552 / Virus Database: 270.10.5/1881 - Release Date: 07/01/2009
17:59
Other related posts: