HTML: The Basic Examples Of HTML (Hyper Text Markup Language)

In this part we will show some fundamental HTML models.

Relax on the off chance that we use labels you have not found out about yet.

HTML Documents

All HTML archives should begin with a report type affirmation: <!DOCTYPE html>.

The HTML document itself begins with <html> and ends with </html>.

The noticeable piece of the HTML report is between <body> and </body>.


<!DOCTYPE html>

<h1>My First Heading</h1>
<p>My first paragraph.</p>


The <!DOCTYPE> Declaration

The <!DOCTYPE> revelation addresses the report type, and assists programs with showing site pages accurately.

It should just show up once, at the highest point of the page (before any HTML tags).

The <!DOCTYPE> declaration is not case sensitive.

The <!DOCTYPE> declaration for HTML5 is:

HTML Headings

HTML headings are characterized with the characterizes the most un-significant heading:


<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>

HTML Paragraphs

HTML paragraphs are defined 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=””>This is a link</a>

The connection’s objective is determined in the href trait.

Characteristics are used to give additional information about HTML segments.

You will get familiar with credits in a later part.

HTML Images

HTML pictures are characterize to the <img> tag.

The source file (src), alternative text (alt), width, and height are provided as attributes:


<img src=”Example.jpg” alt=”” width=”104″ height=”142″>

How to View HTML Source?

Have you at any point seen a Web page and pondered “Hello! How could they do that?”

View HTML Source Code:

Right-click in a HTML page and select “View Page Source” (in Chrome) or “View Source” (in Edge), or comparative in different programs. This will open a window containing the HTML source code of the page.

Investigate a HTML Element:

Right-click on a component (or a clear region), and pick “Investigate” or “Review Element” to perceive what components are comprised of (you will see both the HTML and the CSS). You can likewise alter the HTML or CSS on-the-fly in the Elements or Styles board that opens.