Lesson 2:HTML Elements
Understanding HTML Elements
An HTML element consists of an opening tag, content, and a closing tag. Elements instruct the browser how to present specific pieces of information on the screen.
<h2>This is an Element</h2>
Why & How to Use:
Elements build structural boundaries around text and media. Combining different elements creates rich document structures such as articles, menus, and sidebars.
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>HTML Elements</title></head><body> <h1>HTML Element Example</h1> <p>An element includes the opening tag, content, and closing tag.</p></body></html>