Every web page is build with a lot of tags. These made a better web page structure. Some important html tags are given below with details ...
Every web page is build with a lot of tags. These made a better web page structure.Some important html tags are given below with details .
DOCTYPE
Document Type Definition (DTD) is used in any type of documents. It is used in the starting of the document. There is a lot of html versions. This tag defines the html version to the web server. ! sign is used before DOCTYPE .
Overall we can say this part defines the document syntax and also the structure type. In html we write-
<!DOCTYPE html>
HTML
HTML tag defines html document. HTML documents starts with <html> and finishes with </html>.
Between <html> and </html> all the html other tags are written.
<DOCTYPE html!>
<html>
</html>
<DOCTYPE html!>
<html>
</html>
HEAD
HEAD tag opens with <head> and closes with </head>. In every html page we have to define the head section. We can use more tags between HEAD tags. Example: TITLE
<!DOCTYPE html>
<html>
<head></head>
</html>
<!DOCTYPE html>
<html>
<head></head>
</html>
TITLE
This tag opens with <title> and closes with <title> and closes with </title>. This tag is used in the HEAD section of html page. Which will be shown in the title bar is defined in this tag.
<!DOCTYPE html>
<html>
<head><title>Here you have to write the title</title></head>
</html>
<!DOCTYPE html>
<html>
<head><title>Here you have to write the title</title></head>
</html>
BODY
BODY tag opens with <body> and closes with </body>. Main contents of webpage is written here. Here a lot type of content is saved and shown.
<!DOCTYPE html>
<html>
<head><title>Here you have to write the title</title></head>
<body>It is the main section. Main part of an web page.</body>
</html>
Example
<!DOCTYPE html>
<html>
<head><title>Here you have to write the title</title></head>
<body>It is the main section. Main part of an web page.</body>
</html>
HR
The hr tag represents a horizontal rule.
Its structure is </hr>. It has only finishing tag.
Example:
<!DOCTYPE html>
<html>
<head><title> Horizontal row in web page</title></head>
<body>
<h1>This is the heading</h1> <hr>
We have to write the tags properly.
This tag makes a horizontal line.This tag has no closing tag.
</body>
</html>
BOLD
For showing the text in web page in bold style BOLD tag is used. It starts with <b> and finishes with </b>.
ITALIC
If we want to show the text in Italic style we use this tag. It starts with <i> tag and finishes with </i> tag.
UNDERLINE
For under lining some text or specific word we use UNDERLINE tag.
This tag starts with <u> and finishes with </u>.
NORMAL
This tag is used for showing the texts normally.
It starts with <normal> and finishes with <normal>.
SMALL
We show text in html page in a specific size. But if we want to show the text in smaller that the normal size then we have to use SMALL tag.
That starts with <small> and finishes with </small>.
STRONG
This works as like as the BOLD tag. That means this will also show the texts in bold style.
This starts with <strong> and finishes with </strong>
<html>
<head><title>Here you have to write the title</title></head>
<body>
It is the main section. Main part of an web page.<br>
<b>This is bold style</b><br>
<i>This is italic style</i><br>
<u>This is underlined style</u><br>
<normal>This is normal style<normal><br>
<small>Showing smaller than normal size</small><br>
<strong>This is strong style</strong><br>
<br>
</body>
</html>
Example
<!DOCTYPE html><html>
<head><title>Here you have to write the title</title></head>
<body>
It is the main section. Main part of an web page.<br>
<b>This is bold style</b><br>
<i>This is italic style</i><br>
<u>This is underlined style</u><br>
<normal>This is normal style<normal><br>
<small>Showing smaller than normal size</small><br>
<strong>This is strong style</strong><br>
<br>
</body>
</html>
SUBSCRIPT
SUBSCRIPT tag is used for showing the text little below from the normal text.
This starts with <sub> and finishes with </sub>.
SUPERSCRIPT
SUPERSCRIPT is used for showing the text little upper from normal text.
This starts with <sup> and finishes with </sup>.
<!DOCTYPE html>
<html>
<head><title>Here you have to write the title</title></head>
<body>
H<sub>2</sub>O <br>
a<sup>2</sup>+b<sup>2</sup>
</body>
</html>
Problem:
Show H₂O and a²+b² in html page.Solution:
<!DOCTYPE html>
<html>
<head><title>Here you have to write the title</title></head>
<body>
H<sub>2</sub>O <br>
a<sup>2</sup>+b<sup>2</sup>
</body>
</html>
BLINKING
User will show text constantly turning on and off by BLINK tag.
Use BLINK TAG like this,
Starts with <blink> and finishes with </blink>.
CITATION
If we want to use a sentence as reference then we have to use CITATION tag in html page.
It starts with <cite> and finishes with </cite>.
CODE
If we want to write anything in fixed width format then use CODE tag.
It starts with <code> and finishes with </code>.
EMPHASIS
EMPHASIS used for presenting any special words or any sentence differently. It shows results as like ITALIC style.
EMPHASIS starts with <em> and finishes with </em>.
DEL
This tag is like STRIKE tag. A straight line shows over the text.
It starts with <del> and ends with </del>.
INS
It connects the texts and shows the connected text by underlining. Full form of this tag is INSERT. This is known as INS tag.
It starts with <ins> and finishes with </ins>.
SAMPLE
If we want to anything as an example in any web page SAMPLE tag is used.
It starts with <samp> and finishes with </samp>.
TT
TT is fixed width format type. This tag is known as Teletype.
This tag starts with <tt>and finishes with </tt>.
Example:
<!DOCTYPE html>
<html>
<head><title>Here is the title</title></head>
<body>
<blink> Blink style </blink> <br>
<cite> Referencing style </cite><br>
<code> This is a fixed width format type </code><br>
<em> This is showing the emphasis style </em><br>
<del> Del style in this line </del><br>
<ins> This is the ins tag example </ins><br>
<samp> This is for showing example</samp><br>
<tt>This is also afixed width format type</tt>
</body>
</html>






No comments