Recent

HTML / HTML5 Tutorial Part 2: Most Used Tags


HTML is the Web Language which we use to create websites. for a newbie it's important to understand its structure and tags, for this purpose we are posting important HTML Tags with their usage.

<html></html> tag, this tag is used to contain all other html tags, you can use any of html without <html></html> but for proper website it's important to write a clean code which is easily readable, so you must write all your html tags within <html></html>


<head></head> tag, this tag is used to contain the tags which have the information about your webpage, such as title of you website, meta tags, external javascripts or jquery files, external CSS files.

<title></title> tag, is used to add the title of HTML document, it is important to add a Title in your website, this title is shown in header of your browser's tab with favicon.

<body></body> tag, in this tag we write what we want to show on our page, such as headers, main page area, sidebar, and footer, everything we want to show in our website should be written inside <body> tag.


<br/> break line tag is used to add new line in HTML document, as HTML by nature parse all the spaces and new lines as a one space, their for to add new line in document we use br tag.

Code

this is my text with new line <br> starting from here

Output

this is my text with new line
starting from here

<b></b> Bold tag is used to bold the text in HTML document,  bold tag is the container tag that you must have to close to end the effect of it, other wise it will Bold all the texts written in your document.

Code

<b>this text is written in bold text</b>

Output

this text is written in bold text

<i></i> italic tag is used to italic the text in website, if you have a text and you want to make it italic then you must enclose the text in Italic tag, it is container tag.

Code

<i>this text is written in italic tag</i>

Output

this text is written in italic tag

<center></center> center tag, if you want to move text in center, then you will have to put that text in center tag of HTML, center is also the container tag.

Code

<center>this text is written in center tag</center>

Output

this text is written in italic tag

<sub></sub> Sub Script tag, is used to write a subscript in your document, quiet useful for science related websites and blogs

Code

example of subscript tag H<sub>2</sub>O

Output

example of subscript tag H2O

<sup></sup> Super Script tag, is used to write Super Script text in HTML document or file
sample html file would look like this.

Code

example of Super Script tag (a+b)<sup>2</sup>

Output

example of Super Script tag (a+b)2

Sample Structure of HTML Program is giver below
<html>
<head>
<title> Your Website's Title</title>
</head>
<body>
</body>
<html>

No comments