Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > XHTML Strict - Is this right?

Reply
Thread Tools

XHTML Strict - Is this right?

 
 
Bobby Edward
Guest
Posts: n/a
 
      10-04-2008
To use XHTML Strict all I have to do is...

1. Add this to the top of my master page/ASPX page(s)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
2. Add this to my web.config "<system.web>" section
<xhtmlConformance mode="Strict" />

Correct????


 
Reply With Quote
 
 
 
 
Bobby Edward
Guest
Posts: n/a
 
      10-04-2008
>
> Yes: http://msdn.microsoft.com/en-us/library/ms178159.aspx
>


Thanks. Do you know if this web.config setting takes precendence over the
DocType definition?


 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      10-04-2008
no, all the html and css you enter must follow the xhtml standard. you
should run your pages thru a xhtml compliance tool (visual studio has a
simple one, but it only checks the aspx source, not the rendered html).
also 3rd party controls may not generate compliant html.


-- bruce (sqlwork.com)



Bobby Edward wrote:
> To use XHTML Strict all I have to do is...
>
> 1. Add this to the top of my master page/ASPX page(s)
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> 2. Add this to my web.config "<system.web>" section
> <xhtmlConformance mode="Strict" />
>
> Correct????
>
>

 
Reply With Quote
 
Hal Rosser
Guest
Posts: n/a
 
      10-05-2008

"Bobby Edward" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> To use XHTML Strict all I have to do is...
>
> 1. Add this to the top of my master page/ASPX page(s)
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> 2. Add this to my web.config "<system.web>" section
> <xhtmlConformance mode="Strict" />
>
> Correct????


There's a difference between HTML and XHTML.
For one, XHTML is a type of XML document and has a DTD, but it is based on
HTML 4.0
Check with the W3C http://www.w3.org/MarkUp/#recommendations
and here's a decent set of tutorials on both
http://w3schools.com/



 
Reply With Quote
 
Göran Andersson
Guest
Posts: n/a
 
      10-05-2008
Bobby Edward wrote:
> To use XHTML Strict all I have to do is...
>
> 1. Add this to the top of my master page/ASPX page(s)
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
> 2. Add this to my web.config "<system.web>" section
> <xhtmlConformance mode="Strict" />
>
> Correct????
>


Not correct.

That doctype tag is not an XHTML doctype, it's an HTML doctype. For an
XHTML page you need an XHTML doctype.

http://www.w3.org/QA/2002/04/valid-dtd-list.html


--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing VS2005 to generate HTML 4.01/Strict instead of XHTML 1.0 Rob Roberts ASP .Net 5 01-20-2006 11:38 PM
XHTML Strict and Script Tom HTML 6 11-15-2003 07:12 PM
Need help with strict XHTML Brendan HTML 4 11-03-2003 01:49 PM
Announcing Limited Public Beta - XHTML 1.0 Strict Web Controls Peter L. ASP .Net 0 10-20-2003 08:14 PM
xhtml strict is being very stict why? Christopher R HTML 13 10-01-2003 07:17 PM



Advertisments