- internet programming Tag
- Text Formatting Elements (Part 3)
- Text Formatting Elements (HTML)
- Text Formatting Elements (Part 2)
- Image And Media Elements (HTML)
- Text Formatting Elements (Part 4)
- Area (HTML)
- Head (HTML)
- Text Formatting Elements (Part 5)
- Body (HTML)
- Attributes related to Form Input (Part 1)
We are here to give you the Sight & Sound of Information Technology
What is HTML TAG??? (intro)
As we know that HTML is a language which is used to create and design web
pages. HTML uses instructions which are read by the Internet browser and then it
arranges the elements of web page according to these instructions. These
instructions are called HTML TAGS. These tags are core of Hyper
Text Markup Language (i.e. HTML).
HTML tags are applied mostly in form of pairs (i.e. <p></p>), but some HTML tags are unpaired (i.e. <img>). These unpaired tags are also known as Empty Elements. The web browser never displays the HTML tags, but it uses these tags to interpret the contents of the webpage. These Tags are building blocks of all the web pages. HTML tags and HTML elements both terms almost refer to the same things. But if we distinguish between these two, then we can say that HTML tag is just the HTML keyword enclosed in the angle brackets, but HTML element refers to tag and everything within the tag.
The HTML tags have following properties:
- HTML tags are keywords which are enclosed in the angle brackets (i.e. < >).
- HTML tags are normally in pairs.
- The first tag in the pair is called the Start Tag, while the last tag of the pair is called End Tag.
- The End Tag has same keyword or name as the start Tag, but it also include the Forward slash (i.e. / ) in it. For example </p> or </h1> etc.
- These Start and End Tags are also called opening and closing tags.
HTML tags show two types of behaviors which are following:
1. Block Behavior:
The HTML tags which shows block behavior, will insert the Line Break after the closing tag. These tags include paragraph tag <p>, Heading tag <h1> and many more.
2. In-Line Behavior:
The HTML tags which shows In-Line behavior, will not insert the Line Break after the closing tag. These tags include Bold tag <b> or <strong> , Italic tag <i> or <em>.
Paired vs. Unpaired Tags:
Paired tags are those tags which have an opening tag and a closing tag, but the unpaired tags consist of only opening tag. The unpaired tags do not require the closing tag.
Examples of Paired Tags:
- HTML Tag i.e. <html> </html>.
- Head Tag i.e. <head> </head>.
- Body Tag i.e. <body> </body>.
- Heading tag i.e. <h1> </h1>.
- Paragraph tag i.e. <p> </p>.
- Script Tag i.e. <script> </script>.
Examples of Unpaired Tags:
These are the tags which does not have a companion tag.
- HTML link Tag i.e. <a>.
- Image Tag i.e. <img>.
- Line break Tag <br>
- Input Tag <input>.
Attributes of HTML Tags:
HTML tags also have several attributes by which we can apply several properties on the elements within the tags. We can use these attributes according to our needs. For example, the paragraph Tag <p> has several attributes which can be used to change font-family, font size and font-color of the text within this tag.
< p font-face="arial" font-color="#000000" size="10"> This Is a Paragraph </p>
Different tags have different attributes related to them, the image tag i.e. <img> uses the height and width attributes to adjust the height and width of the image. i.e. <img src="" height="200" width="300">
The contents available on this website are copyrighted by TechPlus unless otherwise indicated. All rights are reserved by TechPlus, and content may not be reproduced, published, or transferred in any form or by any means, except with the prior written permission of TechPlus.