HTML - A Beginners First Steps - Links
Article Index
HTML - A Beginners First Steps - Links
2
All Pages

HTML - A Beginners First Steps - Links

Before I begin...

Due to this article being hosted online I cant actually show you a tag as the webpage you are reading would make it invisible Tags begin with a "" symbol. For the purpose of this

article I will replace these with the "[" and "]" symbols. Remember to always use the arrows though as the square brackets WILL NOT WORK.

A basic link...

To begin with open up notepad and create a simple html page like this;

[html]

[body]

[/body]

[/html]

Now we're going to link to a site. I will write url instead of the web address but you should place http://www.anysite.com where I write "url". The simplest type of link would be the web address on the page. When you click that text it sends you to the

website. Heres how that is done;

[a href="/url"]url[/a]

So, a link is defined by the tag [a][/a] (the "a" stands for anchor, this isn't very important). Within the tag you include the destination of the link i.e. the "href" of the link. Here you place the url that you want to link to inside inverted commas, href="http://www.anysite.com". Finally, the text that you want to actually display on your page is placed between the [a][/a] tags (the tags like all other tags are invisible when viewed in your browser.



 
eXTReMe Tracker
статистика