Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET XHTML
what is DOCTYPE html PUBLIC .... in aspx page?
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 

 
why is XHTML used ..... in aspx page ?
 
<html xmlns="http://www.w3.org/1999/xhtml">
Posted 21-Mar-13 21:41pm

1 solution

Rate this: bad
good
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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.
  Permalink  

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

  Print Answers RSS
0 Marcin Kozub 295
1 OriginalGriff 273
2 Richard MacCutchan 229
3 Praneet Nadkar 197
4 Sergey Alexandrovich Kryukov 190
0 OriginalGriff 7,913
1 Sergey Alexandrovich Kryukov 7,232
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,865


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 22 Mar 2013
Copyright © CodeProject, 1999-2014
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