tags:

views:

53

answers:

4

Which is the strictest mode of XHTML to make my coding habits semantically and better?

XHTML 1.0 Strict or XHTML 1.1

A: 

Probably the aptly named XHTML Strict definition.

Amber
read my question again i adde more info
metal-gear-solid
+1  A: 

From W3C recommendation: XHTML™ 1.0 The Extensible HyperText Markup Language (Second Edition):

A Strictly Conforming XHTML Document is an XML document that requires only the facilities described as mandatory in this specification. Such a document must meet all of the following criteria:

  1. It must conform to the constraints expressed in one of the three DTDs found in DTDs and in Appendix B.
  2. The root element of the document must be html.
  3. The root element of the document must contain an xmlns declaration for the XHTML namespace [XMLNS]. The namespace for XHTML is defined to be http://www.w3.org/1999/xhtml. An example root element might look like:

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
  4. There must be a DOCTYPE declaration in the document prior to the root element. The public identifier included in the DOCTYPE declaration must reference one of the three DTDs found in DTDs using the respective Formal Public Identifier. The system identifier may be changed to reflect local system conventions.

    <!DOCTYPE html 
       PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
    
    
    <!DOCTYPE html 
       PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    
    
    <!DOCTYPE html 
       PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"&gt;
    
  5. The DTD subset must not be used to override any parameter entities in the DTD.

mouviciel
+2  A: 

There is no XHTML mode that will force you to do things semantically or correctly - you need to use knowledge for this.

(Just because a page passes validation, that does not mean it is semantically correct)

Here are a few links that may help:
Writing Semantic HTML
What is Semantic HTML?

Peter Boughton
A: 

Probably either XHTML 1.0 Strict or XHTML 1.1. There's not a huge difference between the two.

mipadi
XHTML 1.1 support =target in <a> while xhtml strict not
metal-gear-solid