#559 Default DOCTYPE needs to be XHTML Transitional

pending
nobody
None
5
2011-10-17
2011-10-15
Anonymous
No

The default DOCTYPE needs to change from Strict:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

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

I was coding a page and wondered why it wasn't looking right across all browsers and then I noticed that the DOCTYPE was screwing up my code. The default DOCTYPE should accept all HTML elements and attributes, INCLUDING presentational and deprecated elements (like font).

This is one thing Dreamweaver has right.

Discussion


  • Anonymous
    2011-10-17

    @codebrainz,
    Strict shouldn't be the default for many coding reasons. I've modified all my Geany templates to use Traditional. All the sites I code use Traditional DOCTYPE. I can could on Linux and my sites will look and work the same on Windows and Mac OS X. Strict DOCTYPE can break a code easily, because it doesn't support every attribute, presentational and deprecated elements. It would be best to have a default DOCTYPE that supports everything, instead of one that wouldn't and confuse new coders.

    Dreamweaver uses XHTML Traditional by default for that very reason.

    Even here W3Schools first example has XHTML Traditional:
    http://www.w3schools.com/tags/tag_doctype.asp

    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.

    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.

     

  • Anonymous
    2011-10-17

    • priority: 5 --> 9
     

  • Anonymous
    2011-10-17

    • summary: Default DOCTYPE needs to be Transitional --> Default DOCTYPE needs to be XHTML Transitional
     

  • Anonymous
    2011-10-17

    @codebrainz,
    Strict shouldn't be the default for many coding reasons. I've modified all
    my Geany templates to use XHTML Transitional. All the sites I code use XHTML Transitional
    DOCTYPE. I can could on Linux and my sites will look and work the same on
    Windows and Mac OS X. Strict DOCTYPE can break a code easily, because it
    doesn't support every attribute, presentational and deprecated elements. It
    would be best to have a default DOCTYPE that supports everything, instead
    of one that wouldn't and confuse new coders.

    Dreamweaver uses XHTML Trasitional by default for that very reason.

    Even here W3Schools first example has XHTML Transitional:
    http://www.w3schools.com/tags/tag_doctype.asp

    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.

    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.

     
    • priority: 9 --> 5
    • status: open --> pending
     
  • As codebrainz, I don't understand why one would like to write deprecated code when creating *new* files. IMO Geany should not suggest that using Transitional is best than Strict, quite the contrary actually.

    Also note that this is, AFAIK, the first time somebody complains we use Strict in the default templates, and maybe if we changed it to Transitional we'd get a very similar report.

    I'd say wontfix unless you convince me/us there are good reasons to change it. Maybe explain what are the "many coding reasons"?
    Also, the fact a WYSIWYG editor like Dreamweaver use Transitional as the default don't seem like a good reason to me, such editors often generate bad style code (using font, background attributes, tables for layout, etc.).

    PS: and please, don't change the priority to something like Highest for something so trivial as a template default -- it's not like Geany was erasing your whole hard drive and send it to a third party.