HTML Basic
HTML Basic:
Each HTML document starts with a <! DOCTYPE html> declaration.
HTML documents begin with the <html> tag and end with the </html>
Example:
- <!DOCTYPE html>
- <html>
- <head>
- <title>This is HTML tutorial</title>
- </head>
- <body>
- <h2>Only Learn 24</h2>
- <p>A rich website for learning programming in Bengali.</p>
- <p>Only Learn 24 provides education free of charge.</p>
- </body>
- </html>
Output:
Only Learn 24
A rich website for learning programming in Bengali.
Only Learn 24 provides education free of charge.
HTML headings:
HTML headings are indicated by <h1> to <h6> in HTML.
The most important with <h1> and thus the least important with periodic <h6>.
Example:
- <!DOCTYPE html>
- <html>
- <head>
- <title>HTML headings</title>
- </head>
- <body>
- <h1>h1 The most important heading</h1>
- <h2>Headings less important than h2, h1</h2>
- <h3>Headings less important than h3, h2</h3>
- <h4>Headings less important than h4, h3</h4>
- <h5>Headings less important than h5, h4</h5>
- <h6>Headings less important than h6, h5</h6>
- </body>
- </html>
Output:
h1 The most important heading
Headings less important than h2, h1
Headings less important than h3, h2
Headings less important than h4, h3
Headings less important than h5, h4
Headings less important than h6, h5
Note: HTML heading tags should never be used to make the text bigger or thicker. Because heading tags are used to convey the importance of content. Only one heading is required for a page.
HTML paragraph:
The <p> tag refers to the HTML paragraph.
An HTML paragraph element begins with the opening <p> tag and ends with the closing </p> tag.
Example:
- <!DOCTYPE html>
- <html>
- <head>
- <title>HTML headings</title>
- </head>
- <body>
- <h1>h1 The most important heading</h1>
- <h2>Headings less important than h2, h1</h2>
- <h3>Headings less important than h3, h2</h3>
- <h4>Headings less important than h4, h3</h4>
- <h5>Headings less important than h5, h4</h5>
- <h6>Headings less important than h6, h5</h6>
- </body>
- </html>
Output:
h1 The most important heading
Headings less important than h2, h1
Headings less important than h3, h2
Headings less important than h4, h3
Headings less important than h5, h4
Headings less important than h6, h5
HTML paragraph
The <p> tag refers to the HTML paragraph.
An HTML paragraph element begins with the opening <p> tag and ends with the closing </p> tag.
Example:
<!DOCTYPE html>
<html>
<head>
<title>HTML paragraph</title>
</head>
<body>
<p>This is a paragraph</p>
<p>This is another paragraph</p>
</body>
</html>
Output:
This is a paragraph
This is another paragraph
HTML link:
The link is created in HTML with the <a> tag and the destination of this link is determined by the href attribute.
Example:
- <!DOCTYPE html>
- <html>
- <head>
- <title>HTML paragraph</title>
- </head>
- <body>
- <a href="https://onlylearn24.com/">This is a link</a>
- </body>
- </html>
Output:
HTML image:
Example:
- <!DOCTYPE html>
- <html>
- <head>
- <title>HTML image</title>
- </head>
- <body>
- <img src="onlylearn24.png" alt="onlylearn24.com" width="140" height="140">
- </body>
- </html>
Output:
How to view HTML source code in browser?
To find the source code for 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 rule for other browsers. This will open the page with the HTML code in a new browser window.
Summary of the chapter
The HTML document starts with a <! DOCTYPE> declaration.
Only the middle part of the <body> element is displayed in the browser.
<h1> to <h6> are called heading elements.
<p> Paragraphs are created by elements.
The link is created by the <a> element.
The image is added by the <img> element.
tag: HTML basic, HTML headings, HTML paragraph, HTML link, How to view HTML source code in browser, Summary of the chapter, basic web design, basic web design tag, web design, learn web design, h tag, heading tag, HTML basic link, HTML image, basic image tag, image tag, photo tag, img tag, html basic template, html basic structure, html basic tags, a basic html page
Thank You............
shelleyakter
So nice post, Thank You.
shelleyakter
So nice