HTML Elements

Lots of beginners find it hard to fint difference between HTML elements, nested elements, and tags. Let's break it down step-by-step to clarify these generalities.

What's an HTML Element?

An HTML element is a complete unit that includes:

Start tag + Content + End tag

Example


     <p> Welcome to MK_Coder.com </p>
                 

Nested Element

Sometimes, elements are placed inside other elements. This is called nesting. Imagine a box inside a bigger box.

Example of a Nested Element


        <div>
          <h1>Learn from MK_Coder.com</h1>
          <p>This is a paragraph inside a div.</p>
        </div>
                         

HTML elements help structure the webpage just like build blocks!