Click here to Skip to main content
13,091,145 members (51,265 online)
Rate this:
Please Sign up or sign in to vote.
See more:
what is DOCTYPE html PUBLIC .... in aspx page?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

why is XHTML used ..... in aspx page ?
<html xmlns="">
Posted 21-Mar-13 20:41pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

These two are related. The first row in the document defines the DTD: XHTML 1.0 Transitional. (There are others too[^].)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

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. It is not that strict, it is supporting the transition between html and strict xhtml.
The xmlns attribute in the html tag tells the parser, that the content of the tag can be validated according to that namespace, and of course it is used also by Visual Studio intellisense.

The browsers can render page without any of them, but might not behave as desired. Other meta markups can be also added to tel the browser how to treat the page.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 22 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100