HTML Lesson 3: Elements
What is an element? In HTML, an element refers to content that is surrounded by an opening and a closing tag. In the previous lesson, we used the following example to create a paragraph:
<p>Hello</p>
This is an element because it has an opening and closing tag, as well as content in-between the tags. Any given webpage can be made up of hundreds or even thousands of elements. This element would be called a <p> or paragraph element, since it is made up of <p> tags and defines a paragraph.
There are also empty elements which don't contain any content. For example, <br> is an empty element that defines a line break. It is an empty element because it has no closing tag and no content.Lesson recap:
- Elements refer to opening and closing tags and the content in-between them.
- There are also empty elements, which have no content and are made from empty tags.
In the next lesson, we’ll look at the basic structure of an HTML document and break down the individual elements to understand what each of them does.