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>.

  <head> <title> Blockquotes </title>
      Abraham Lincoln is generally regarded as one of the greatest presidents of the U.S. His most 
      famous speech was delivered in Gettysburg, Pennsylvania, during the Civil War. The speech 
      began with
        "Foursore and seven years ago our fathers brought forth on this continent, a new nation,
        conceived in Liberty, and dedicated to the proposition that all men are created equal.
        Now are are engaged in a great civil war, testing whether that nation or any nation so
        dedicated, can long endure/"
        Whatever one's opinion of Lincoln, no one can deny the enormous and lasting effect he had
        on the U.S.

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.
  1. Internal (link to within website)
    1. Within Same Page
    2. Different Page
  2. External (link to other website)
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.

  <head><title>Let's Keep Going</title></head>
    <h1>Links Example</h>
    <hr />
    <p><a href="/basics.html">Basics</a> |
      <a href="b-lesson-1.html">Lesson 1</a> |
      <a href="" target="_blank">The Beatles</a> |
      <a href=" web site">Mail Someone</a>

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.

Links Example

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.

Basics  1  2  3  4  prev  next