HTML Basic – Basic HTML Structure

HTML Basic Example:

<!DOCTYPE html>

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


The <!DOCTYPE> Declaration

The <!DOCTYPE> declaration represents the document type, and helps browsers to display web pages correctly. It must only appear once, at the top of the page (before any HTML tags). The <!DOCTYPE> declaration is not case sensitive. The <!DOCTYPE> declaration for HTML5 is:

<!DOCTYPE html>

HTML Headings

HTML headings are defined with the



defines the most important heading.

defines the least important heading:
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 1</h4>
<h5>This is heading 2</h5>
<h6>This is heading 3</h6>

HTML Paragraphs

<p>This is a paragraph.</p>
<p>This is another paragraph.</p>

HTML Links

<a href="">This is a link</a>

The link’s destination is specified in the href attribute. Attributes are used to provide additional information about HTML elements. You will learn more about attributes in a later chapter.

HTML Images

HTML images are defined with the tag. The source file (src), alternative text (alt), width, and height are provided as attributes:

<img src="" alt="itnursery logo" width="104" height="142">

Leave a Comment