HTML Elements

Chapter 3

We discussed HTML tag in previous chapter. Now let's move to HTML Elements.

An HTML Element is combination of start tag, end tag and content between start and end tag e.g. <...> content </...>.

HTML Elements can be nested like <H1> Hi <span> Reader </span> welcome </H1>. A nested HTML Element can have one or more HTML Elements inside it.

Let's have an example

<!DOCTYPE html>
<html language="en">
        <title> My First Page </title>
        <h1> Hi <span> Reader </span> welcome!!! </h1>

In example above, html, head, body, title, h1, span each one is a HTML Element. html contains two child HTML Elements head and body. head and body contains one-one HTML Element child each title and h1. title contains text node and h1 contains text node and span Element.

Note: HTML tags are case insensitive, means <HTML> and <html> is same for borwser. Mostly developers use lower case values.

Chapter 4 - HTML Attribute