#whatishtmlelements
Explore tagged Tumblr posts
interviewclassroom-blog · 6 years ago
Link
Tumblr media
There are two types of html elements:
1.Empty Elements
2.Nested Elements
EMPTY HTML ELEMENTS
HTML elements with no content are called empty elements.
<br> is an empty element without a closing tag (the <br> tag defines a line break):
<p>This is a <br> paragraph with a line break.</p>
Empty elements can be “closed” in the opening tag like this: <br />.
NESTED HTML ELEMENTS
HTML elements can be nested (elements can contain elements).
All HTML documents consist of nested HTML elements.
This example contains four HTML elements:
Example
<!DOCTYPE html> <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
0 notes