Mastering HTML Elements: A Deep Dive into Headings, Links, Images, Divs, and Spans (HTML Course: Part II)
In the previous lesson, we covered the basics of HTML, including its structure and common elements. In this lesson, we’ll take a closer look at some of these common HTML elements and learn how to use them to create more complex pages.
Headings
The <h1>
to <h6>
elements are used to create headings. The numbers indicate the level of importance, with <h1>
being the most important and <h6>
being the least. It's important to use headings correctly to create a logical and clear structure for your web page.
<h1>This is a heading level 1</h1>
<h2>This is a heading level 2</h2>
<h3>This is a heading level 3</h3>
Links
The <a>
element is used to create a link. The href
attribute is used to specify the link's destination.
<a href="https://www.google.com">This is a link</a>
Images
The <img>
element is used to insert images. The src
attribute is used to specify the image's source, and the alt
attribute is used to provide alternative text for the image.
<img src="image.jpg" alt="A beautiful landscape">
Div and Span
The <div>
and <span>
elements are used to group HTML elements together. The <div>
element is a block-level element, while the <span>
element is an inline element.
<div>
<p>This is a paragraph inside a div element.</p>
</div>
<span>This is a span element.</span>
I’ll repeat this through the lesson, if you don’t get anything read twice because HTML is an extremely is to understand language… Anyways if still think you’re not understanding comment below and I’ll (only if it’s legit) reply
Link to Next Lesson