Every HTML document <!DOCTYPE html>
begins with a declaration.
HTML documents <html>
begin with tags and </html>
end with closing tags.
Only the part between <body>
the and </body>
tags is visible in the browser.
Example
HTML Document
Table of Contents
Toggle
Quick Learn
A rich website for learning programming in English.
QUICKLEARN provides completely free education.
Output
Quick Learn
A rich website for learning programming in English.
QUICKLEARN provides completely free education.
HTML heading
In HTML, <h1>
the from <h6>
tag refers to the HTML heading or title.
<h1>
The most important heading is indicated by and <h6>
the least important heading is indicated by.
Example
HTML Headings
This is Heading 1
This is Heading 2
This is Heading 3
This is Heading 4
This is Heading 5
This is Heading 6
Output

Basic concepts of HTML
Note: HTML heading tags should never be used to make text larger or bold. Because heading tags are used to indicate the importance of the content. Only one heading should be used for a page.
HTML paragraph
<p>
The tag represents an HTML paragraph.
An HTML paragraph element <p>
begins with an opening tag and </p>
ends with a closing tag.
Example
HTML Paragraph
This is a paragraph
This is another paragraph
Output
This is a paragraph
This is another paragraph
HTML link
<a>
Links are created in HTML using tags and href
the destination of this link is specified using attributes.
Examples
HTML Link
This is a link
Output
HTML image
<img>
Images or pictures are displayed in the browser using HTML tags.
<img>
, , and are used as attributes of the tag :src
alt
height
width
Examples
HTML Image
This is a heading
This is a paragraph.
How to view HTML source code in a browser?
To find the source code of a page, right-click on the page and select “View Page Source” (in Chrome browser) or “View Source” (in IE browser) or follow the same rules for other browsers. This will open the page containing the HTML code in a new browser window.
Chapter summary
- HTML
<!DOCTYPE>
begins with a document declaration. - Only
<body>
the middle part of the element is displayed in the browser. <h1>
From<h6>
is called the heading element.<p>
Paragraphs are made up of elements.<a>
Links are created by elements.<img>
Images are added by element.