Introduction

HTML is a standard markup language used mainly for constructing webpages. HTML stands for HyperText Markup Language.

Interestingly, HTML is not considered a programming language as it doesn't contain dynamic functionality.

Hello World

The three main parts of an HTML element are:

EXERCISE

Create a paragraph containing the worlds 'Hello World' using the following code, <p>i am in a p tag</p>. The result is:

Hello World

Try it yourself!

Paragraphs

The HTML <p> element defines a paragraph. A paragraph always starts on a new line, and browsers automatically add some white space (a margin) before and after a paragraph.

HTML DISPLAY

You cannot be sure how HTML will be displayed.

Large or small screens, and resized windows will create different results.

HTML, you cannot change the display by adding extra spaces or extra lines in your HTML code.

The browser will automatically remove any extra spaces and lines when the page is displayed:

Headings

Search engines use the headings to index the structure and content of your web pages.

Users often skim a page by its headings. It is important to use headings to show the document structure. <h1> headings should be used for main headings, followed by <h2> headings, then the less important <h2>, and so on.