×

Html & Html5

The World's best Software Development Study Portal

HTML Basic


1. Simple HTML Document:
All HTML documents must start with a document type declaration: !DOCTYPE html. The HTML document itself begins with html and ends with /html. The visible part of the HTML document is between body and /body.


Example-

<h1> My Heading</h1>

<p> My Paragraph. </p>

Output:


My Heading

My Paragraph.


2. HTML Heading

Heading tag is used to give the heading or sub headings to your web page. Size of the text will depend upon the heading tag used.
Example:

<h1> My Heading</h1>

<h2> My Heading</h2>

<h3> My Heading</h3>

<h4> My Heading</h4>

<h5> My Heading</h5>

<h6> My Heading</h6>

Output:


h1 defines most important heading and h6 defines least important heading.


My Heading

My Heading

My Heading

My Heading

My Heading
My Heading

3. HTML Paragraph

This tag is used to define a paragraph in the web page. It is used as p to start and end /p a paragraph.


Note:Browser itself add an empty line before and after a paragraph.

Example-

<p> Welcome to Ittraining classes in Gurgaon(Haryana). We provide Best training in AWS, Digital marketing </p>

Output:


Welcome to Ittraining classes in Gurgaon(Haryana). We provide Best training in AWS, Digital marketing


4. HTML List

All lists contain one or more list items.There are differnt type of list in Html.
Example

<h2>Unordered List with Disc Bullets</h2>

<ul> type="disc">

<li>Coffee</li>

<li>Tea</li>

<li>Milk</li>

</ul>

Output:


Unordered List with Disc Bullets

  • Coffee
  • Tea
  • Milk

5. HTML image tag

It is used to display image on the web page.
Example:

<h2>HTML Image Example</h2>

<img src="image/himalayas.jpg" alt="himalayas" style="width:100%">

Output:


HTML Image Example

himalayas


6. HTML Link

It is used to link one page with another page.
Example:

<p> <b>HTML anchor Tag </b> </p>

<p> <a href="best-html-training-insitute.html"> Visit our HTML tutorial </a> </p>

Output:

HTML anchor Tag

Visit our HTML tutorial