What Should Be the First Tag in Any HTML Document?

Learn via video course
FREE
View all courses
JavaScript Course With Certification: Unlocking the Power of JavaScript
JavaScript Course With Certification: Unlocking the Power of JavaScript
by Mrinal Bhattacharya
1000
4.8
Start Learning
JavaScript Course With Certification: Unlocking the Power of JavaScript
JavaScript Course With Certification: Unlocking the Power of JavaScript
by Mrinal Bhattacharya
1000
4.8
Start Learning
Topics Covered

Build an AI-First Career, Master the Complete Skillset

Choose from our industry-leading programs designed for career success

NSDC Certified

Modern Software and AI Engineering Program

Master full-stack development with AI integration

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Modern Data Science and ML with specialisation in AI

Advanced data science techniques with AI specialization

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

Advanced AIML with Specialisation in Agentic AI

Deep dive into AIML with focus on Agentic systems

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

DevOps, Cloud & AI Platform Engineering

Build and manage AI-powered cloud infrastructure

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program
NSDC Certified

AI Engineering Advanced Certification by IIT-Roorkee

Premier AI engineering certification from IIT-Roorkee

3 MonthsDuration
AI-LedCurriculum
Career SupportSupport
Program highlights
Go to Program
NSDC Certified

AI Forward Deployed Engineer Program

Full-stack engineering, production AI and client-facing consulting

12 MonthsDuration
AI-LedCurriculum
Career SupportSupport
GoogleAmazonPaytm+1000 more
Go to Program

Overview

While writing any HTML program we use the HTML tag <html> </html> as the first tag. The HTML tag is also known as the root of the HTML document and it is used first because we want the web browsers to know that the given document is HTML.

Syntax

The syntax of an HTML document is almost the same and very simple. Firstly we start any HTML document by using an HTML tag followed by the head, title and body. We can also have additional tags depending upon our requirements.

Sharpen Your Fundamentals with Free Learning

Basic Skeleton of every Web Page

As discussed earlier the basic structure or flow of every web page is almost the same. There are a few necessary details that we need to give while making our web page. These details include:

  • Making web browser aware that this is HTML document (Thus we start by <html></html>, HTML tag)
  • Stating the title of our web page (We use <title></title> , title tag for that)
  • The machine-readable information about HTML document like title, scripts, stylesheets etc. (We use <head></head>, head tag for that).
  • Finally giving the content that will be shown on our web page (We use <body></body>, body tag for tag)

Again there might be many other tags getting used in the HTML document but it depends on the user requirements.

How Scaler Transformed Careers in Different Fields

₹23L
AVG CTC
SCALER PLACEMENT PROOF

Scaler learners achieved 2.5x salary growth with average post-Scaler CTC reaching ₹23L.

11,000+placements
650+companies
Verified data
Hiring Partners:
GoogleGoogleAmazonAmazonMicrosoftMicrosoftFlipkartFlipkartAdobeAdobe1200+ more

Example of HTML tag

The HTML tags are special keywords written inside angle brackets (<>) that tells about type of content present in the webpage. There are many types of tags like <html></html> tag,<head></head> tag etc.

Let's look at an example of how the program written in HTML looks like in a browser:

The input code is:

The output on the webpage is:

HTML tag example

Supported Browsers

Nowadays almost all web browsers support HTML. Some of the popular ones are

  • Google Chrome
  • Mozilla Firefox
  • Internet Explorer
  • Safari
  • Microsoft Edge
  • Opera etc.

The latest version of HTML that is HTML5 is mostly supported in the newer versions of these browsers like Chrome version 61 to 70 supports HTML5. Similarly, Firefox version 4 to 63 partially supports HTML5 form features property and Safari browser version 10.1 to 12 supports HTML5 form features.

Turn Learning into Career Growth

1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary
1200+Hiring Partners
89%Placement Rate
11,000+Placements
147%Avg Salary Increment
2.5XCareer Growth
₹23 LPAAvg Post-Scaler Salary

Learn More

For more information about HTML and HTML tags you can articles on Scaler topics like

Conclusion

Thus so far we discussed that:

  • First tag in any HTML document is <html></html> (HTML tag).
  • It is also known as root element of the document.
  • We use it as first tag because it helps browsers recognise that a given document is a HTML document.