Home » » Learn HTML [ Day 3 ]

Learn HTML [ Day 3 ]

Written By Admin on December 01, 2013 | 1:19:00 am

This is third post on Learn HTML.If you want to checkout earlier post on HTML.Click the links given below.
Learn HTML Day 1 [Intro]
Learn HTML Day 2 [List of Tags in HTML]
Today We are going to give uses of different but mostly used and essential Tags of HTML in this post.Let us Start with Q & A mode

1) How to create hyperlink in HTML ?
= Hyperlink is nothing but a link which navigates user from one page to another.Creating Hyperlink in HTML is very easy.For creating Hyperlinks <a> tag is used.Syntax of <a> tag is <a href="target address of link">data for link</a>

         Code: <a href="http://www.thetechdigit.com">TheTechDigit.Com</a>
         Output : TheTechDigit.Com

2) How to make different effects on text ?
= Effect on texts are used to distinguish text between normal texts.There are few tags in HTML to give different effects as like font option in your microsoft word.

     -To make text paragraph <p> tag is used . 
           Code: <p>This is Paragraph.</p> 
           Output : This is Paragraph .
           note: for each occurrence of p tag, texts are written in new line


     -To make text bold <b> tag is used . 
           Code:  <b>This is Bold.</b> 
           Output : This is Bold .

     -To make text italic <i> tag is used .
           Code: <i>This is Italic.</i> 
           Output : This is Italic .

     -To make text italic <i> tag is used .
           Code: <i>This is Underline.</i> 
           Output : This is Underline .

      -To make text center aligned <center> tag is used.
           Code: <center>This is Center Aligned.</center> 
           Output : 
This is Center Aligned.

3) How to insert a image in document?
= Images are very important aspect of any website.To insert an image into document using HTML <img> tag is used.Its syntax is <img src="address of image followed by its extension" alt="alternative text"/>

          Code: <img src="http://www.techdigit.com/image.png" alt="myimg"/>
           Output : The above code will insert an image into your page.

3) How to link external stylesheet to your page?
= Stylesheets are often used to give look to your web page and its element.The code of written in CSS are stored into stylesheets are those are keep in your hosting account.To link any stylesheet (.css file) to your page <link> tag is used.Syntax is <link href="address of .css file" rel="stylesheet" type="text/css"/>.To link any external stylesheet to your page.

          Code: <link href="style.css" rel="stylesheet" type="text/css"/>
          Replace style.css with address of your stylesheet file to insert it in your webpage.

4) How to insert a javascript file in your page?
= Javascripts are used to increase enhancement of your webpages.They contains different function to carried out specified results when they executed.Javascript are stored with .js extension and inserted into page by using <script> tag.Following Sample Code will load your javascript in your page

          Code: <script src="sample.js" type="text/javascript"></script>
          Replace sample.js with address of your javascript to insert it in your webpage.

Follow us