Custom Search

News World

Mar 14, 2008

Web Develop > Link and Separator - Lesson - 04

Any object such as text, a graphic image etc. that leads us to a new page on the web is called a link. Links can point to a page on our site or to a web page on another site.


Text Links

Creating a text link is an easy task. We will use "A" "/A" tag to do this.
Above code will create a link that clicking on it will send the user to Yahoo website. We have used HREF parameter to specify destination web page. Text between "A" and "/A" is link text which user will click on it to go to destination page.


Image Links

In previous section we used a text as a link point. It is possible to use an image instead of text. To do this, you must replace link text between "A" and "/A" with an tag that displays an image file.

In above example clicking on picture will bring surfer to the address of "A HREF=".."" tag. If you see the result in a browser you will notice a blue border around the picture. This blue border added to image because it is a default for image links. If you don't want this border, use border=0 parameter.



Email links

If you have surfed web for a while you have seen links that when you click on them your email program starts a "compose new message" window that its receiver address is entered from web page . This email address is the address you want email to be sent to. Look at example below to see how you can make a link to an email address.

"BODY"
Click on below link to send an email to me "BR"
"A HREF="
mailto:web.solusi@gmail.com"" Email Me"/A"
"/BODY"
It uses a "mailto:" string before desired email address to convert it into a link address. If you want, you can use a subject for the email. This example will show you how to do this:

Just know that some browsers and email programs do not support subject in email links.



Lists

There are times that you want to insert items related to a subject in list form in your web page. HTML provides you with tags to do this.

    tags are first choice of these tags.

    If you want the items to start with numbers instead of bullets, you must use
      tags instead of
        tags.
        Be sure to write down codes in a file and view it with a browser.



        Horizontal Separator Rule

        Another useful html tag that you will use, is "HR> tag. If you need to separate text in your web page by horizontal lines , you may use this tag.

        "BODY"
        First section
        "HR>
        Second section
        "/BODY"
        Result is two lines of text separated by a horizontal rule. You can specify parameters for horizontal
        rule. If you want to change width of rule you can use width parameter.

        "HR WIDTH="50%"" width in percent
        "HR WIDTH="100"" width in pixels
        You can also determine line size parameter to change line diameter."HR size=5"

        It is obvious that you can mix parameters with each other. Horizontal rule created by this tag is a line that has a shade. You can change the rule to a solid line instead of a shaded line, you can add a NOSHADE parameter.

        "HR SIZE=1 NOSHADE"
        You can also determine Color for your line:
        "HR color="#000000""
        Above line will not have a shade and it is a solid line.

        No comments:

        IT Conversations

        Moneycontrol Latest News

        Latest new pages on Computer Hope

        Latest from Infoworld

        Door Lock

        Door Lock Import Top Door Lock from China Contact Quality Manufacturers Now