Basics : Lesson 2
In this lesson you will learn tags for block quote, links, and comments.
Block Quotes are indented paragraphs which are used to differentiate between simple text and spoken words. You have seen them in novels, newspapers, books etc.
Here is an example.
The code is very simple. It starts with <blockquote> and ends with </blockquote>.
Everything between <blockquote> in indented and one line space is added at the beginning and at the end of this tag.
Now lets go to very important tag <a>. <a> is used to link to some location. There are two types of link tags.
As you can see the Internal Link has two sub categories. One is to link to same page. You have seen in many web pages where the link leads you down to some particular text in the same page. Or when you are down at the page and there is a link TOP to go to top of the page.
The second type of Internal LInk is to go to different page but within the same web site. For example, this link will take you to Lesson 1
. It is internal link because you are still in same web site.
External links will take you to a web site other than the site you are visiting.
Lets have an example. This example has second type of Internal links and couple of external links. There is also a "mailto" link which is used to open the default mail program in the client's (users) computer and send e-mail.
Here is the code of this.
First two links are internal. href in tag <a> is one of the function or property of tag <a>. href is to reference the link to some other location. In the first two links, I just used the location of where I want user to go. For internal links, you need to specify the location of the page within your web site you are linking to.
For external links, just write the complete URL including "http://". Some web sites starts with "www" and some don't. Make sure you try the link by yourself.
You have noticed that The Beatles web site opens in new browser. It is done using another property target="_blank". This tells browser to open the link in a new window.
Comments in HTML code starts with <!-- and ends with -->. For example:
<!-- This is a comment. Comments are not displayed in the browser. -->
Comments are written to define or explain part of code for reference and record. They do not display on the browser.