DOCTYPE
GitHub: https://github.com/sreenathkspanikker

DOCTYPE

Tips and Notes

Tip: The <!DOCTYPE> declaration is NOT case sensitive.

Tip: To check if the HTML of your Web documents is valid, go to W3C's validation service.

Common DOCTYPE Declarations

HTML 5

<!DOCTYPE html>

HTML 4.01 Strict

This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

HTML 4.01 Transitional

This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

HTML 4.01 Frameset

This DTD is equal to HTML 4.01 Transitional, but allows the use of frameset content.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

XHTML 1.0 Strict

This DTD contains all HTML elements and attributes, but does NOT INCLUDE presentational or deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML.

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

XHTML 1.0 Transitional

This DTD contains all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font). Framesets are not allowed. The markup must also be written as well-formed XML.

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

XHTML 1.0 Frameset

This DTD is equal to XHTML 1.0 Transitional, but allows the use of frameset content.

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

XHTML 1.1

This DTD is equal to XHTML 1.0 Strict, but allows you to add modules (for example to provide ruby support for East-Asian languages).

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

To view or add a comment, sign in

More articles by Sreenath Panikker

  • How to create a private & public route in React - example: for authenticated users only

    Hello folks! It always happens when you're building a react app and configuring your routes, you find out that you…

    3 Comments
  • 10 CSS Interview Questions

    1. What is CSS? CSS outlines the style of an HTML webpage.

  • 10 HTML Interview Questions

    These HTML Interview Questions and Answers will help you get through your interviews. 1.

    1 Comment
  • Gatsby

    GraphQL + React + Webpack \ Gatsby can be used to build static sites that are Progressive Web Apps, follow the latest…

    8 Comments
  • React.js

    Introduction Today we are going to kick off the first installment in a new series of tutorials, Learning React, that…

  • Gulp

    As developers we often need to look at the tools we use and decide if we are using the right tool for the job. Chris…

  • HTML4 Vs HTML5

    HTML4 has been a standard web development for more than 10 years. HTML4 is approved and ratified as a standard language…

  • What Does a UX Designer Actually Do?

    UX Design refers to the term User Experience Design, while UI Design stands for User Interface Design. Both elements…

  • Sass Basics

    Sass is a CSS pre-processor. Sass reduces repetition of CSS and therefore saves time.

  • WHAT’S NEW IN FRONT END DEVELOPMENT?

    Being a web developer, you must know the latest web technologies in 2016. Either you are a professional…

    6 Comments

Explore content categories