HTML Elements
In the previous lesson, we learned about the basics of HTML and its structure. Now, let's dive deeper into HTML elements and how to use them effectively.
Here are some common HTML elements that you will use frequently:
These can also all be styled! Check out our CSS tutorial to learn how to style HTML elements effectively.
Let's see how to use some of these elements in an HTML document:
<!DOCTYPE html>
<html>
<head>
<title>HTML Elements Example</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<a href="https://www.example.com">This is a link</a>
<img src="image.jpg" alt="Example Image">
<div>This is a division</div>
<span>This is a span</span>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
</tr>
<tr>
<td>Cell 3</td>
<td>Cell 4</td>
</tr>
</table>
</body>
</html>
By understanding and using these HTML elements, you can create well-structured and visually appealing web pages. In the next lesson, we will explore more advanced HTML topics and techniques.