Easy To Learning
  • Login
  • Sign Up
  • Q&A
  • Home
  • Php Tutorial
  • MySql Tutorial
  • Object-Oriented Programming
  • Java Tutorial
  • HTML Tutorial
  • React JS Tutorials
  • Free Projects
  • Blogs & Articles
  • Others
    • About Us
    • Contact Us
HTML Title Or HTML Doctype
Easy To Learning

Education Needs Complete Solution

Online Ask Question Question And Answer
  1. Home
  2. HTML Tutorials
  3. HTML Title Or HTML Doctype

HTML Tutorial

Basic HTML Fundamentals

  • HTML Table Content
  • Introduction To HTML
  • What Is HTML
  • HTML Tags
  • HTML Formatting
  • HTML Heading
  • HTML Paragraph
  • HTML Anchor
  • HTML Image
  • HTML Table
  • HTML Lists
  • HTML Ordered List
  • HTML Unordered List
  • HTML Description List
  • HTML Form

HTML Tags

  • Marquee HTML
  • HTML Textarea
  • HTML Quotes
  • HTML Style
  • HTML Title Or HTML Doctype
  • HTML Div Tag
  • HTML Pre Tag
  • HTML Code Tag
  • HTML Label Tag
  • HTML Input Tag
  • HTML Button Tag
  • HTML Hr Tag
  • HTML Br Tag
  • HTML Script Tag
  • HTML NoScript Tag
  • HTML Bold Tag

HTML Title Or HTML Doctype

HTML Title

HTML title tag is used to provide a title name for your webpage. It is necessary for Search Engine Optimization (SEO).

The HTML title tag must be used inside the <head> tag.

The title of the page is displayed on the title bar of the browser.

Example of HTML title tag.

<!DOCTYPE html>  
<html>  
<head>  
    <title>HTML Title Example | First web page.</title>  
</head>  
<body>  
    <p>HTML Title Example : Welcome to my first web page.</p>  
</body>  
</html>  

Here you see that we are using two elements, the head tag and the title tag. The whole title element is within the head tag.

The head element which appears before body element just contains the information about the page but it doesn't display on the browser window. So, to display a title name on the web page, title element is used.

If you look at the above example, you will see that "HTML Title Example | First web page" will be displayed on the tab/ title bar of the browser. Content(text) between <title>.............</title> is shown on the title bar.

Doctype HTML

On the HTML document you have often seen that there is a <!DOCTYPE html> declaration before the <html> tag. This <!DOCTYPE html> declaration is not an HTML tag. It is used to instruct the web browser about the HTML page.

Actually, there are many type of HTML e.g. HTML 4.01 Strict, HTML 4.01 Transitional, HTML 4.01 Frameset, XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset, XHTML 1.1 etc.

The <!DOCTYPE> declaration refers Document Type Declaration (DTD) in HTML 4.01; because HTML 4.01 was based on SGML. But HTML 5 is not SGML based language.

DTD defines the rules for the markup languages so that the browsers recognize the content correctly.

The doctype declaration differs between HTML versions. The HTML 5 doctype declaration is given below.

<!DOCTYPE html>

Example of HTML document with doctype declaration.

<!DOCTYPE html>  
<html>  
<head>  
<title>This is the title</title>  
</head>  
<body>  
This is the content of the document.  
</body>  
</html>  

Supporting Browsers

Element  Chrome  IE  Firefox  Opera  Safari
<title> / <!DOCTYPE html> Yes Yes Yes Yes Yes
Series: HTML Tutorials Hub
All Topics
Free Download Projects
Previous Chapter
Next Chapter

Ask a Question

Have a coding query or doubt? Ask here and get help from our community.

500 characters remaining
Submitting...
Free Download Projects
Join Telegram Group Join WhatsApp Group
Related Topics:
html title attribute css title attribute tooltip body tag in html title css css title style examples title tag examples title attribute css html title icon

Member Sign In

Forgot?
Signing in...

Don't have an account? Register here

Create Free Account

Register Captcha
Registering...

Already have an account? Sign In

Ask a Question

500 characters remaining
Submitting...

About Easy To Learning

Easy To Learning is a comprehensive programming learning portal offering free, practical, developer-driven tutorials for PHP, Java, Python, Spring, MySQL, CSS, Bootstrap, CakePHP, and more.

Explore community-contributed questions and answers, and download ready-to-run source code projects.

Quick Links

  • Home
  • Questions & Answers
  • Download Projects
  • Blog & Articles
  • Member Login

Community

  • Telegram Group
  • WhatsApp Community
  • Ask a Question
  • Join as Member

Connect With Us

Stay updated with our newest programming tutorials and free open source projects.

© 2026 Easy To Learning. All Rights Reserved.