The following example creates a web page that has a link to a website:
| Example |
<html> |
|
<head> |
<title> My list of jokes </title> |
</head> |
|
<body> |
|
<h1>This is my list of jokes </h1> |
|
<ul> |
<li>Classic jokes </li> |
<li>Math jokes </li> |
<li>Food jokes</li> |
</ul> |
|
<hr/> |
|
<ol> |
<li>Crazy jokes</li> |
<li>Ethnic jokes</li> |
<li>Golf jokes</li> |
</ol> |
|
<hr/> |
|
<A A href="http://expertrating.com/" target="_blank"> Link to expertrating </A> |
|
</body> |
</html> |
|
| |
This is how the web page looks:
The background of this page is white. This is because style sheets have not been applied in this example. Style sheets enables a good amount of formatting to the web page.
Clicking on the hypertext link ‘expertrating’ in the example opens the website www.expertrating.com .
This is www.expertrating.com
|
| |
| |
| |
| Summary |
| |
In this chapter you have learnt:
- URL is an acronym for Uniform Resource Locator.
- Relative path links are those links in which the path to the linked file, relative to the location of the current file is specified.
- Absolute path is used to link those documents that are not directly related to the current document.
- An anchor is a piece of text or some other object (like image) to mark the beginning and/or end of a hypertext link.
- Href stands for Hypertext Reference. The address of the file or the address of the website is given in the ‘href’ tag.
|
| |
| Review Questions |
| |
Question 1
What does URL mean?
Answer
Uniform Resource Locater
Question 2
The files that are located in the subdirectories can be linked by:
Answer
Relative Pathnames
Question 3
How are the documents that are not directly related to the current document linked?
Answer
By Absolute Pathnames
Question 4
Which tag is used for linking?
Answer
Anchor tag
Question 5
Which tag is used to specify the address of the file to be linked?
Answer
Href tag
|
| |
| |
| What's Next |
| |
The next chapter will acquaint you with the basic concepts of images in a web page. The chapter will further illustrate how to insert and place the image in a web page, and describe image mapping.
Hop over to the next chapter to get a close up on images.
|
| |
|
|