You are here: Re: internal webpage links « HTML « IT news, forums, messages
Re: internal webpage links

Posted by Mark Parnell on 09/30/86 11:25

Previously in alt.html, dorayme <dorayme@optusnet.com.au> said:

> <a id="something"></a>
>
> without anything between opening and closing
> tags kosher?

It's permitted by the specs, but I would recommend against it. The specs
note:

"Note. User agents should be able to find anchors created by empty A
elements, but some fail to do so."

While this is probably not relevant now (the specs *are* nearly 6 years
old), any browser that can find an anchor by id can match the id on any
other element too.

Also, if you have any CSS rules like a {...}, they will apply to your
empty anchors, as well as any actual links. You can avoid that by making
sure you use a:link, but it's easier to avoid empty anchors.

> <h1><a id="something">This should appear</a></h1>

An id can go on any element, so the <a> is superfluous.

<h1 id="something">This should appear</h1>

--
Mark Parnell
http://clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация