Learn HTML Elemenets



In this lesson we will learn about the HTML Elements.


There are several types of HTML nodes, element is a type of document component.


Each element can have HTML attributes specified. Elements may also have content, including other elements and text.


HTML elements without content are called empty elements.


This is the HTML Element syntax:


< tagname > -Content- < /tagname >


Start tag Element content End tag
< h1 > Heading text < /h1 >
< p > Paragraph text < /p >
< br >


Code Example:

                      <p>Jack Sparrow</p>    
            


HTML Elements are not case sensitive, < h1 > is the same as < H1 >





Learn about Empty HTML Elements


HTML elements without content are called empty elements.


< br > is an example of an empty HTML element with no closing tag, we use it to define a line break:


Code Example:

                Start of showing code      <p>Jack Sparrow <br> is a pirate</p>
     
            
Try yourself >>





Learn about Nested HTML Elements


HTML elements can also contain elemenets, this example contains three HTML elements:


Code Example:

                Start of showing code       <!DOCTYPE html>
<html>
<body>
<p>Learn HTML</p>
</body>
</html>
     
            
Try yourself >>

Example details:
the < html > element defines the whole document.

Inside we have the < body > tag.

Inside we have the < p > tag.









FreeCodeWiki best way to learn responsive web development with html5 & css3 for beginners, we allow students free and easy programming lessons, enjoy this html5 course content



Navigation