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. We will learn what it means later.
- 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 HTML know that it is a closing tag, not an opening tag.
Instructions
<h1>
, content My first HTML element!
, and closing tag </h1>
Start programming for free
2/9