Martin Francis

Blog of Web Designer Martin Francis

Jun 10

HTML, hyperlinks and images, the basics.

blog image relevant to text

When working in HTML for the first time the very first principle that was is the one of “containment” which means that content must have a tag in front and a tag and the end.
With this blog I have used examples of html code but left off the <> brackets that usually surround the code so that the code is not recognised by the blog text editor.
The next is what links the internet together which is the hyperlinks and these can be a “relative address” where you use the Anchor hyperlink reference or “a href” to go to a local directory and “absolute address” where you use the full hyper text transfer protocol (HTTP) address that you see entered in browsers.
With all these links it’s important to understand the relationship of the directory forlders. For example &ldquoParent” or “grandparent” folders when referring to relative linking.
If the parent folder is the folder that all the code and images are held then any page linking to another page within the parent folder does not need the full HTTP address in it’s link. For example A page would use the tag a href=“bpage.html” (inside of <>) then the words describing the link such as “link to B page” then the closing tag /a inside <> brackets.
The full address of “B page” could be placed there after the ahref= but it is not necessary.
If there is another level folder the parent folder, can become the grandparent folder.
If you want to link a page that is held within the lowest level of folder (which you can call the parent folder) and you want to link to a page or image in a higher level folder (which you could call the grandparent folder) then you use the tag a href=“../apage.html” then the description, and then the closing tag.
And this is still addressing the file or page locally.
Useful for long scrolling text is the relative links that are links that point to the Anchor point that is at the top of the page.
You may have seen this this before where sometimes you see a “back to top” link. Of course you get this the other way with the Anchor points throughout the long page with the links to them at the top commonly used in FAQ pages.
Absolute addressing then is only necessary when you want to link to websites outside of the one you are currently looking at.
And so the full HTTP address is used but sometimes you don’t want to have the reader/user leaving your website and just simply open a new window with the original window still open then you use:-
a target=“_blank” href=http://www.etc etc etc.....
Without the attribute “target=_blank” the reader may leave your website and never come back!!
The next important principle while working on a web page is how your working

Posted by: martin Last updated on:2010-07-28 17:26:07
Tag:- html basics