HTML Revision Notes

Example:

Attaching the styleheet SAMPLE.CSS to the web page.

<link rel="stylesheet" type="text/css" href="/SAMPLE.CSS">

Place the above line of code in between the <head> tags.

 

Example:

Make the text CIE Exams as a hyperlink to the webpage CAMBRIDGE.HTML, that will open in a window called _circular

<a href="/CAMBRIDGE.HTM" target = "_circular"> CIE Exams </a>

Target can take the following values:

 _blank  Opens the linked document in a new window or tab 
 _self  Opens the linked document in the same frame as it was clicked (this is default)
 _parent Opens the linked document in the parent frame 
 _top Opens the linked document in the full body of the window 
 _framename   Opens the linked document in a named frame

 

Example:

Insert the image blackcat.jpg in the web page and resize the image to 100 pixels wide maintaining aspect ratio.

<img src="/blackcat.jpg" width = 100px>

Make the above image as a hyperlink that point to the website http://www.wildcats.com that opens ina new window called cats

<a href="/http://www.wildcats.com" target = "_cats"> <img src="/blackcat.jpg" width=100px> </a>

 

Example:

Make the text mail me as a hyperlink to send an email to the address This email address is being protected from spambots. You need JavaScript enabled to view it. with a subject line Application developer

<a href="mailto:This email address is being protected from spambots. You need JavaScript enabled to view it.?subject=Application%20Developer"> mail me </a>

Spaces between words should be replaced by %20 to ensure that the browser will display the text properly. 

 

Example:

Create an anchor called start. This must be invisible in the browser.

<a name = "start" >   </a>

 

Make the text Go to start  as a hyperlink that will point to the anchor created above:

<a href = "#start" > Go to start </a>

 

Who is online

We have 53 guests and no members online