An HTML element is defined by a start tag, some content, and an end tag. The start tag and end tag are enclosed in angle brackets, and the content is placed between them.
Start Tag | Content Between Tag | End Tag |
---|---|---|
<h1> | Welcome to my first webpage | </h1> |
<p> | My first paragraph. | </p> |
<br> | None | None |
<br> is HTML Elements have no content and do not have an end tag, such elements are called empty elements.
This tag defines a line break.
Some HTML elements will display correctly, even if you forget the end tag.
But we recommend you to not miss the end tag, because sometimes it will show unexpected results and errors on webpages.
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<p>Welcome to my first webpage
<p>My first paragraph.
</body>
</html>
Try It ยป