This week (30.10.08) Tony talked about hyperlinks and images.
Very first thing that was covered was the principle of "containment" which means that content must have a tag in front and a tag and the end. And went on to explain hyper links and images.
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.
Tony explained the difference between "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.
Something that was in the book Heads first HTML & CSS was the terms "Parent" or "grandparent" folders.
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.
The "../" was something new that I certainly had not heard of before.
Wasn't mentioned in the lecture but down through the folders as in
a href="afolder/bfile.html" or even
ahref="afolder/bfolder/cfile.html" was mentioned.
Another thing that was mentioned on the lecture was putting anchor points within a long paragraph of text.
I had only seen this before where sometimes you see a "back to top" link.
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 Tony never mentioned that 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!!
To summarise Tony talked about how your working environment should "mirror" whats on your public or server file.
Then Tony went on to talk about images.
The most important things for me were:-
1. that you should use the "alt" and dimension attributes because they are required for validation.
2. that you can dither a GIF so that you can give the appearance of a graduated colour without going to the generally large file sizes of jpegs. Which could be handy for a vector diagram such as a company logo with a graduated tine or it could be used for a button or tab like the tab on the browser window a few inches about this text if you are using IE 7. But this is of limited use and JPEGs are still better for photo's.
3. Interlacing where the image appears out of focus and then gradually comes into focus as the page loads fully.
Tony only mentioned his own website tutorial as a link we should follow up.
In the tutorial/lab session I needed to make sure that my form page validated correctly and that meant the W3C validation and the Javascript validation.
The week before I had only got partly through constructing the table.
It can be seen at.
Link to Martins form2The empty field validation works, and it is W3C validated too.
At home I added the email validation and that worked fully too.
Felt the compulsion to do a little jig around my dining room after that.
Much to the surprise of my children who were watching James Bond.
Then I had to explain why the jig was necessary. I have never seen their eyes glaze over so fast. I don't think they really needed to know in quite such detail.
I used the Head Up books on HTML & CSS pages 591 to 638 for the form part and Heads Up book on JAVAscript pages 293 to 304 for the Javascript validation part.
OK I look at it and think I am a week behind but that particular exercise was to me really important and I couldn't have it partially working or not understanding it.
So this week I have to catch up with other exercises and set up the file "ittwassignment" on my public directory. Which I may have done had it been mentioned again within the detail of the blog part of the assignment on page 2.
I am pleased that page 3 of the charity website in the assignment is now simply a modification of what I already have and not something I have to put hours into.