HTML Elements


Chapter 2 - HTML Elements

In the previous chapter, we went through an Introduction to HTML. In this chapter we shall explore HTML Elements

In HTML, an element comprises of following component.

  • It starts with a start tag e.g. <div>
  • This is followed by the content. This content can be another HTML element which is nested inside
  • This is followed by the closing tag with a forward slash symbol. E.g. </div>

An example is shown below for reference.

<div>
<h1>Welcome</h1>
<p>Hello World</p>
</div>

Some more examples of HTML tags or element are <div>, <a>, <h1>, <p>, etc. We will explore each of these element in detail in subsequent tutorials.

We must keep some points in mind while using the HTML tags or elements. These are listed below:

  • Always ensure to close a start tag. Though this will not give any error in HTML, but it may cause unexpected issues such as tag properties or behaviors may get extended to the next elements, etc.
  • HTML is case insensitive, i.e. <DIV> or <div> both are treated same in HTML. However, the industry standard practice and recommendation from W3C is to use tag names in small case. E.g. <html>, <div> , etc.

I hope you understood what is an HTML Element, See you in the next chapter...

Next Chapter Chapter 3 - HTML Headings and Paragraphs

Follow Me on Social Media

Boost your Sales with Free CRM Software

Streamline your sales process and increase productivity

  • Lead & Deal Tracking
  • Contact Management
  • Manage Tasks, Meetings, Emails
  • Custom Fields
  • Collaborate within Team

Signup for Free


Sign up for DigitalOcean cloud and get FREE $200 credits

Deploy your hobby projects for Free

DigitalOcean Referral Badge