HTML Basic Tags and Structure

HTML Basic Tags

HTML is the code that is used to structure a web page and its content. The content could be structured within a set of paragraphs, a list of bulleted points, or using images and data tables.

There are very less thing in HTML which needs to be keep in mind, very few rules are there.

  • In HTML everything is tag, we have to understand basic about all tags and then it’s depends on us how we will use those tags.
  • While creating a HTML document we have to take care about <html>, <head> and <body> tags, where they will be open and where they will be close.

Basic HTML Layout

<!DOCTYPE html>
    <title>Page Title</title>
<p>Paragraph............</p> </body> </html>

Doctype html

The <!DOCTYPE html> tag act as links to a set of rules that the HTML page had to follow to be considered good HTML, which could mean automatic error checking and other useful things.

Basically, you can say that it is used for informing web-browser, the HTML document is written in which version of HTML, so that web browser can understand the version of document and render it according to that version rule.


The <html> element wraps all the content on the entire page, and is sometimes known as the root element.

Head Tag

The HEAD tag start with <head> and end with </head> tag. The <head> element acts like a container for all the stuff. This includes things like keywords & description a page with <meta> tags that you want to appear in search results, CSS to style our content with <link> tags, character set declarations.

Meta Charset="utf-8" -

This <meta charset="utf-8"> element sets the character set your document should use to UTF-8, which includes most characters from the vast majority of human written languages.

Title Tag

The <title> element the sets the title of your page, which is the title that appears in the browser tab the page is loaded in. It is also used to describe the page when you bookmark / favourite it.

Body Tag

The <body> element contains all the content that you want to show to web users when they visit your page, like - text, heading, paragraph, images, videos, games, playable audio tracks etc.

Heading Tags

HTML also has six levels of headings, which use the elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6>. While displaying any heading, browser adds one line before and one line after that heading.

<h1> defines the most important heading. <h6> defines the least important heading

Paragraph Tag

The <p> tag offers a way to structure your text. Each paragraph of text should go in between an open_tag <p> and a close_tag </p>.

Line Break Tag

The <br /> tag is a empty tag. It has a space between the char and the forward slash. If you omit this space, older browsers will have trouble rendering the line break, while if you miss the forward slash character and just use <br> it is not valid in XHTML.

Center Tag

For Centering Content, You can use <center> tag to put any content in the center of the page.

Horizontal Lines

Horizontal lines are used to visually break-up sections of a document. The <hr /> tag creates a line from the current position in the document to the right margin and breaks the line accordingly.


GDATAMART.COM is optimized for learning & job information; The users try to improve your knowledge and practical experience through this site but we cannot warrant full correctness of all content... Learn More → | Sitemap →

© 2020 GDATAMART | All Rights Reserved