Monday, 8 September 2014

Basic HTML Tags



Lecture 3
HTML Basic Tags – 

Today we will learn rest of HTML tags.

HTML Link Tag: Link tag is an empty tag or an unpaired tag. This tag defines the relationship between a document and an external resource. Link tag generally used to link style sheets. This tag is placed in head tag. Link tag uses different attributes, like href, rel, target, type etc….
·         Href: Specifies the location of the linked document.
·         Rel: Specifies the relationship between the current and linked document.
·         Target: Specifies where the linked document is to be loaded.
·         Type: Specifies the media type of the linked document.

Example:



HTML Hyperlink Tag: There are two types of hyperlink tags in html – 
1.       HTML Internal Hyperlink tag – Internal linked is linked within the same web page. Internal link name is followed by a head sign (#). HTML <a> tag is referred to a internal link into a same page. When you click on this anchor link, its referred link automatically scrolls and display on browser.
Example 1:
<a name=”products”> link can be referred as <a href=”#products”>Products</a> automatically.
Example 2: To learn how it work, go to the below link and download html file -

2.      HTML External Hyperlink tag – External links is linked to an external web page. <a > tag is used for anchor name which is referred link to another web page. We can use anything as hyperlink with anchor tag, like – word, group of words, images etc.
Syntax - <a href=”url”> link text </a>
href - specifies the destination of the link.
Example: <a href=” http:// www.about.me/suresh.pal19” >About ME</a>


HTML List Tags: In HTML, there are 3 types of lists – 

1.      Unordered List:  An unordered list starts with <ul>tag. It is a paired tag. Each list item starts with the <li> tag, li stands for list item. <li> tag is also paired tag.
Syntax- <ul><li>List Item Tezt</li></ul>
Example: 

We can use type attribute with <ul> tag with values, like – cicle, square, disk and rectangle.
Examle; <ul type=”circle”><li>list item</li></ul>

2.      Ordered List:  An ordered list starts with <ol>tag. It is also a paired tag. Each list item starts with the <li> tag, li stands for list item. <li> tag is also paired tag. Here we can also use type attribute with <ol> tag with values, like – 1, A, a, I, i.
Syntax- <ol><li>List Item Tezt</li></ol>

Example: 

3.      Nested List: List can be nested (List inside list).
Example: 


Note: In Next lecture, we will learn different advance html tags used in html document or web page.

No comments:

Post a Comment