×

HTML Basic Tags

Heading Tags: This tag represents the document header. It is said to be a good practice if every document starts with Heading. Heading tags ranges from H1 to H6 i.e. six different levels where H1 is max size and H6 is the min size. 
  Example:
<!DOCTYPE html>  
<html>  
<head>  
<title>Heading Example</title>  
</head>     
<body>  
<h1>Tutorial and Example</h1>  
<h2>Tutorial and Example</h2>  
<h3>Tutorial and Example</h3>  
<h4>Tutorial and Example</h4>  
<h5>Tutorial and Example</h5>  
<h6>Tutorial and Example</h6>  
</body>     
</html>
Paragraph Tag: This<p> tag let your Html document text to structure into different paragraphs. This tag is a non-empty tag thus, <p> is for opening and </p> for closing tag. 

Example:
<!DOCTYPE html>
<html>
<head>
<title>Paragraph Example</title>
</head>
<body>
<p>This is Tutorial and Example Website </p>
<p>You are reading HTML tutorial</p></body>
</html>

  Output:
This is Tutorial and Example Website
You are reading HTML tutorial
Line Break Tag: This tag is an empty tag which allows programmer to break the line immediately after its placement. Anything that follows it starts from the new line. Example:
<!DOCTYPE html>
<html>
<head>
<title>Line Break Example</title>  
</head>
<body>
<p>You are reading Tutorial on
<br>TutorialandExample.com Website <br> Thanks. </p>
</body>
</html>


  Output:
You are reading Tutorial on
TutorialandExample.com Website
Thanks.
Center Tag: This tag is used to put any content on the center of the page or any table cell. Example:
<!DOCTYPE html> 
<html>  
<head>  
<title>Center tag Example</title> 
</head>     
<body>  
<p>TutorialandExample.com </p>  
<center><p>TutorialandExample.com </p><center>  
</body>  
</html>


  Output:
TutorialandExample.com
TutorialandExample.com
PRESERVE FORMATTING: As the name suggest it allows your text to follow exact format of how it is written i.e. it preserve your text on which format it is written. 
Syntax is <pre>....</pre>.
Example:
<!DOCTYPE html>  
<html>  
<head>  
<title>Preserve Formatting Example</title>  
</head>     
<body>  
<pre>TutorialandExample.com is a website which provide tutorials   
{In many technology}. Also the fastest (Growing website) having alert   
(very high trust percentage) </pre>  
</body>  
</html>
Output:
TutorialandExample.com is a website which provide tutorials   
{In many technology}. Also the fastest (Growing website) having alert   
(very high trust percentage)
Non-breaking Spaces: It is used when we don't want browser to split the text across two lines. Its syntax is &nbsp. Example:
<!DOCTYPE html> 
<html>  
<head>  
<title>Non-breaking Space Example</title>  
</head>     
<body>  
<p> Basic example is TutorialAndExample</p>  
</body>  
</html>
Output:
Basic example is Tutorial And Example

Related Topics

HTML City tag

HTML <City> tag HTML < cite > tag specifies a citation, a reference or title to a creative work, quoted content, books, websites, a research paper, a blog post, a painting,...

3 minutes read.

HTML Font Color

The HTML <font> tag has an attribute called color, which defines the color of the text. We use the color attribute inside the <font> tag to specify the color of...

6 minutes read.

Html &lt;center> Tag

The term HTML refers to Hyper Text Markup Language. The most widely used markup language for making web pages is HTML. A structure of web page is described in HTML....

3 minutes read.

HTML <script> Tag

For embedding a client -side script, we use script tag in html tag. This <script> tag can be used for containing scripting statements. It can also point another external script file...

2 minutes read.

HTML Frames

Frames in Html is used to divide the browser into different sections where each section can load different Html documents. Collection of frame is known as Frameset. Creating frames:We use frameset...

2 minutes read.

HTML Anchor

HTML Anchor The HTML anchor tags define a hyperlink that links to other pages on one page. It can create hyperlinks to any web page and files, locations or any other...

3 minutes read.

HTML Data Tag

HTML Data Tag: The HTML < data > tag is used to transmit its content to a machine-readable version. The data are presented in a particular format. It is useful...

3 minutes read.

HTML 5 Tutorial

What is HTML5? HTML5 is a programming language which stands for the acronym Hyper Text Markup Language 5. It is program that enables the appearance of web pages to be changed, as well as changes...

5 minutes read.

HTML <svg> tag

SVG is used to determine the vector-based graphics in XML format. What is SVG? We utilize SVG tag to specify visuals for the website. The attribute of SVG in a HTML document...

2 minutes read.

HTML <summary> tag

When we simply want to show the primary heading or topic name of hidden detailed material to users, then we can achieved this by using the summary tag. This makes it...

2 minutes read.

HTML Forms

Forms are required when we want to collect data from the user. Html forms consists of different fields to take user inputs such as: input, text area, checkbox, password, radio...

4 minutes read.

HTML <section> tag

The section element in HTML is used to define sections in a document. Syntax of Section Tag: <body> <h1>……….</h1> <section> <h2>……….</h2> <p> …………………………</p> </section> <section> <h2>………..</h2> <p>…………………………. <p> </section> </body> Examples of Section Tag Example 1: In this example, we use the HTML "section" element...

3 minutes read.

How to append HTML code to a div using JavaScript?

In HTML, we have a div tag which is used to create a box where we can put a lot of other tags. So it works like a container. So,...

4 minutes read.

HTML Canvas

HTML Canvas: Using JavaScript, the < canvas > tag in HTML is used for drawing graphics on web page. It can be used to draw routes, boxes, text, gradient, and...

3 minutes read.

Font tag in HTML

HTML stands for Hypertext Mark-up Language and is used to create web pages and other information that can be later displayed in a web browser. It also consists of a...

4 minutes read.

HTML Form Action

The <form> tag has an attribute named action that contains a URL. The HTML action attribute defines the webpage URL on which you want to send the data after submitting...

4 minutes read.

How to create a link with no underline in HTML

In HTML, an anchor tag (<a>) is a Styled Container tag, which means when a hyperlink is created using this, browsers, by default, display the link by applying some styles...

5 minutes read.

HTML Form Input Types

HTML Form Input Types An important element of the HTML form is < input type= "> in HTML. The type attribute of the input element can be of different types, which...

8 minutes read.

Html Wbr Tag

The Line Break Opportunity element A word break opportunity is a place in text from where the browser breaks a line. This opportunity is represented by the element wbr in the...

2 minutes read.

HTML <sup> Tag

The HTML sup element is used to describe one or more superscript contents. The sup tag shows a text which is presented above the regular line and half the length...

2 minutes read.