HTML Basic Examples
In this section, we will show some fundamental HTML models. If we use tags that you have not yet learned about, don't worry.
HTML Documents:-
- All HTML reports should begin with a record type statement: <! HTML> is DOCTYPE.
- The HTML archive itself starts with <html> and closes with </html>.
- The apparent piece of the HTML archive is among <body> and </body>.
<!DOCTYPE html>
<html>
<body>
<h1>My First BlogyHub</h1>
<p>My first paragraph.</p>
</body>
</html>
The <!DOCTYPE> Declaration:-
- The <! DOCTYPE> statement addresses the archive type and assists programs with showing site pages accurately.
- It can only be one time, at the top of the page (before any HTML tags), so it must be there.
- The <! The DOCTYPE> declaration does not consider the case.
- The <! DOCTYPE> statement for HTML5 is:
<! DOCTYPE HTML>
HTML Headings:-
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
HTML Paragraphs:-
HTML sections are characterized with the <p> tag:
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
HTML Links:-
HTML links are defined with the <a> tag:
<a href="https://www.blogyhub.com">This is a link</a>
The href attribute specifies the destination of the link.
HTML elements are further described with the help of attributes.
In a subsequent chapter, you will learn more about attributes.
HTML Images:-
The <img> tag is used to define images in HTML.
As attributes, the width, height, alternative text (alt), and source file (src) are provided:
<img src="blogyhub.jpg" alt="blogyhub.com" width="104" height="142">