Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7520647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:06:20+00:00 2026-05-30T02:06:20+00:00

Possible Duplicate: What's up, Doctype? HTML: What is the functionality of !DOCTYPE Okay, when

  • 0

Possible Duplicate:
What's up, Doctype?
HTML: What is the functionality of !DOCTYPE

Okay, when I first learn HTML, I basically learn from trial and error as I went along, and didn’t really sit down to properly learn it as far as I can remember. As a result of this, I’ve missed out a lot, and therefore, I’ve decided to start from the basics for my own benefit. 🙂 So here I am, (re-)learning HTML.

Now, my question – the <!DOCTYPE> tag confuses me more than any other HTML tag I’ve ever come across, so I’ve come here to clear up any questions I have regarding it so I can use it confidently. 🙂

Firstly, can someone explain to me why it’s necessary to use a <!DOCTYPE> tag in your webpages? They work fine without them, don’t they? I’ve read that it is so it can be validated against the standards of the W3C, but that’s all I know. A little more detail would be appreciated. 🙂

Secondly, after reading up on it, I’m still confused as to what exactly goes in my <!DOCTYPE> and how to type it out. For example, this is one kind of DOCTYPE I’ve seen used:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Yet I’ve also seen other variations, and from what I’ve read, there are different DOCTYPES to validate against – it’s all so very confusing, which should I use in my webpages if I was going to use one?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:06:21+00:00Added an answer on May 30, 2026 at 2:06 am

    W3C has a pretty good answer to this at http://www.w3.org/QA/Tips/Doctype

    Why?

    Why specify a doctype? Because it defines which version of (X)HTML
    your document is actually using, and this is a critical piece of
    information needed by some tools processing the document.

    For example, specifying the doctype of your document allows you to use
    tools such as the Markup Validator to check the syntax of your
    (X)HTML. Such tools won’t be able to work if they do not know what
    kind of document you are using.

    But the most important thing is that with most families of browsers, a
    doctype declaration will make a lot of guessing unnecessary, and will
    thus trigger a “standard” rendering mode.

    Basically if you leave it out, the browser will try and guess what rendering mode to use, and it might cause some unexpected results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: HTML: What is the functionality of !DOCTYPE hi i am .asp web
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
Possible Duplicate: How do you send email from a Java app using Gmail? How
Possible Duplicate: Singleton: How should it be used Following on from Ewan Makepeace 's
Possible Duplicate: Data transfer from JavaScript to PHP. How can i get the browser's
Possible Duplicate: How to call a JavaScript function from PHP? I have a php
Possible Duplicate: Extracting dollar amounts from existing sql data? I have a column in
Possible Duplicate: Set HTML5 doctype with XSLT I'm new to xslt and I'm trying
Possible Duplicate: What's up, Doctype? When create a new file in Netbeans IDE I
Possible Duplicate: How would I identify if a website originates from a mobile browser?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.