HTML Element Structure

What is an HTML element?

An HTML element is a basic building block of HTML. Whether you want to insert text, an image, or a link on a page, you will always need to use an HTML element.

Structure of an HTML element:

  1. Opening tag - indicates the start of an HTML element. It consists of the element name enclosed in < >. In the image, the element name is h1. We will learn what it means later.
  2. Content - specifies the content of the element. In this case, it is the text "Hello world!", but it can also be other HTML elements.
  3. Closing tag - indicates the end of an HTML element. It is the same as the opening tag, except that it has a / after < to let HTML know that it is a closing tag, not an opening tag.

Instructions

Create an element with an opening tag <h1>, content My first HTML element!, and closing tag </h1>

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

2/9