Skip to main content

Command Palette

Search for a command to run...

Html Tutorial For Beginners Part 5

In this story you're going to learn how nest HTML elements within each other🀯

Updated
β€’1 min read
Html Tutorial For Beginners Part 5
A

I am a web developer from Afghanistan and I am ready for remote working and mentoring and as well for accepting internship.

We learned how to add heading elements, paragraph element, image and anchor element into a website, but today it's time to learn how to nest them within themselves.πŸ€”

Like example below:

<>...<>...</>...</>

If you notice we encapsulated one element within other element, let's break it down a little bit for better understanding πŸ‘‡ For example if we want to nest paragraph element inside heading elements we could do thisπŸ‘‡

<h1>I am heading element<p>,but I am paragraph element encapsulated within heading elements</p></h1>

The above code is the general formula or method of nesting HTML elements within each other. For if we want to convert an image into a link we could do this πŸ‘‡

<a href="https://www.unsplash.com" target="_blank"><img src="https://www.unsplash.com/logo.png" alt="unsplash logo"></a>

If you have any questions or suggestions let me know in the comment section below πŸ—¨πŸ‘‡πŸ‘. Please like ❀ and share β†—οΈπŸΉ

HTML TUTORIAL FOR BEGINNERS

Part 5 of 11

In this series, I will teach or post useful lessons about HTML and it's tips and tricks

Up next

Html Tutorial For Beginners Part 6

In this story you're going to learn how to create dead link using hash symbol #