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:
- 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. As you already know, it stands for heading level 1, the main heading of a page.
- Content - specifies the content of the element. In this case, it is the text "Hello world!", but it can also be other HTML elements.
- 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 the browser know that it is a closing tag, not an opening tag.
Instructions
Create an element with the opening tag <h1>, the content My first HTML element! and the closing tag </h1>.
Start programming for free
2/8