By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more


Reference on the HTML a Element.

Edited: 2016-01-11 02:25

The A Element is used to create links to other pages.

For accessibility reasons, its best to separate navigational links with something like "-", or place them inside html lists.

HTML a Element example

The first is just a single link, inclosed in p tags.

<p><a href="">Brugbart in English</a></p>

The next is two links, (can be multiple), again inclosed in a single p element, but this time separated by "-".

<p><a href="">Brugbart in English</a> - <a href="">Brugbart in Danish</a></p>

The last example is best for navigation menus, and incloses the links in li elements. In this case in an unordered list.

   <li><a href="">Brugbart in English</a></li>
   <li><a href="">Brugbart in Danish</a></li>

If using images as links, don't forget to make sure, that the links are accessible. Its a good idea to use the alt tags, since this will be what a screenreader reads when they encounter images as links.