Topic 2
Topic 2
HTML Elements
Start tag and End tag
Heading Element
Paragraph Element
Body Element
Empty Element
Nested HTML Element
Performance Tasks:
2.1 Creating Web Page Using HTML Elements
HTML Elements
An HTML element usually consists of a start tag and end tag, with the content inserted in between:
HTML elements with no content are called empty elements. Empty elements do not have an end tag, such as the
<br> element (which indicates a line break).
</body>
</html>
1|Page-JACC
Example Explained
The <html> element defines the whole document.
It has a start tag <html> and an end tag </html>.
The element content is another HTML element (the <body> element).
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
Example
<html>
<body>
<p>This is a paragraph
<p>This is a paragraph
</body>
</html>
<br> is an empty element without a closing tag (the <br> tag defines a line break).
2|Page-JACC
Empty elements can be "closed" in the opening tag like this: <br />.
HTML5 does not require empty elements to be closed. But if you want stricter validation, or if you need to make
your document readable by XML parsers, you must close all HTML elements properly.
Activity 2:
1. 0 Creating Simple Webpage Using HTML Elements
Create a simple webpage that displays the following:
1. An essay that talks about your personal life.
a. It must have 4 paragraphs; each paragraph must have 5 sentences.
2. The page title must be “MY FIRST WEB PAGE”.
3. The first heading is “My Autobiography”
4. Your simple webpage must apply the following elements:
a. body element
b. heading element
c. paragraph element
d. <br> element
Use of HTML Elements Used all the required Few of the required Missed three or more
elements correctly. elements were used required elements.
correctly.
3|Page-JACC
4|Page-JACC