Teaching Home HTML Introduction HTMLtags HTMLdoc Element Tree HTML Element Attributes CSS Introduction CSS Basics JavaScript Introduction JavaScript Basics Python Introduction Python Basics Pesky Pixie Home (separate website)

HTML Introduction (This is an h1 element)

<h1> heading text goes here </h1>

An HTML element is defined by a starting tag. If the element contains other content, it ends with a closing tag.

For example, <p> is starting tag of a paragraph and </p> is closing tag of the same paragraph but <p>This is paragraph</p> is a paragraph element.

Marco Muscroft HTML teaching resource (This is an h2 element)

<h2> heading text goes here </h2>

Welcome (This is an h2 element)

<h3> heading text goes here </h3>

Here is another header (This is an h3 element)

<h4> heading text goes here </h4>

And Another (This is an h4 element)

<h4> heading text goes here </h4>

Yet another (This is an h5 element)
Last one (This is an h6 element)

<h6> heading text goes here </h6>

Now here's paragraph element which gives a paragraph...........................................

<p> Paragraph text goes here </p>

This is a divider element.

<div> Div contents goes here </div>

Void Elements

There are some HTML elements which don't need to be closed, such as <img>, <hr> and <br> elements. These are known as void elements.

Nested HTML Elements

It is very much allowed and often necessary to place one HTML element inside another HTML element − this is called nesting.