HTML Elements - Code4xU

HTML elements are defined by Starting tag,Content and closing tag.


        
              <tagname>content goes Here</tagname>
Example:
         <p>This is a paragraph</p>
               <h1>Heading Goes Here</h1>



Nested HTML Elements
  • This means that HTML Elements can contains other Elements.
                            for example:-

          <href="#"><p> Click Here</p></a>
         <h1>This is a <b>Heading</b></h1>

  • There are some HTML elements which don't need to be closed, such as <img.../><hr /> and <br /> elements. These are known as void elements.

HTML documents consists of a tree of these elements and they specify how HTML documents should be built, and what kind of content should be placed in what part of an HTML document.


<!DOCTYPE html> <html> <head> <title>Nested Elements Example</title> </head> <body> <h1>This is <i>italic</i> heading</h1> <p>This is <u>underlined</u> paragraph</p> <a href="https://www.w3schools.com">Back to School</a> </body> </html>

Sajal Gupta

Hi, i am sajal.I am a hardworking engineering graduate specialised in Computer Science Engineering ... Along with my degree, I completed C/C++,.Net,Java and SQL courses From Youtube and Other sources and various technologies.I learnt helped me develop my final year project called Code4xU..

Post a Comment