TRENDING TOPICS

×

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 kept in mind, very few rules are such as:

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

Basic HTML Layout

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 the web-browser, the HTML document is written in which version of HTML, so that the web browser can understand the version of the document and render it according to that version rule.

HTML Tag

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 as 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 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/favorite 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 the <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.

Advertise With Us

We offer sponsored posts and guest posts with do-follow links, back-links, and other advertising services, To advertise email us at "advertise@gdatamart.com"

© 2021 GDATAMART.COM (All Rights Reserved)