Re: Transitional vs strict vs loose

Discussion in 'HTML' started by j, Jul 24, 2011.

  1. j

    j Guest

    On 7/24/2011 9:23 AM, Alfred Molon wrote:
    > I'm about to "modernise" the html code on my site, by changing the
    > doctype from html 4.01 transitional to strict and modifying the code so
    > that it validates.
    >
    > Something I noticed is that I have to change the css to maintain the
    > look. For instance I had to add a "line-height: 1.0em" in some spots.
    > Here is an example:


    Use only html 4 strict or the XHTML 1.0 Transitional. Both put the
    browser in standards compliant mode. What other practical differences
    between them other than not validating xhtml like <br /> with html 4
    strict I do not know.

    You'll need to add units and the box model will be different (padding
    will change widths). There are some other changes which will make life a
    little easier, such as tables will now inherit font styling from body.

    I've been using:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

    If someone has a good reason not to switch to:

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

    I'd like to hear it. The XHTML doctype is mostly what I see being used.
    Are there any rendering differences or is it all validation?

    Jeff
     
    j, Jul 24, 2011
    #1
    1. Advertising

  2. On Sun, 24 Jul 2011 12:53:43 -0400, j wrote:

    > If someone has a good reason not to switch to:


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


    As I understand it, XHTML 1.0 was meant to be a stepping stone from SGML
    based HTML to XML based XHTML, which suggests that if you're writing new
    pages, rather than converting old HTML to XHTML, you should use XHTML 1.1.

    So:

    If you're going to write in XML/XHTML, use XHTML 1.1

    If you're going to write in HTML, use HTML 4.01

    *but* as I understand it IE prior to 7 (and possibly IE 7 and IE 8 as
    well?) don't recognise xhtml served with the w3c recommended mime type of
    "application/xhtml+xml".

    So, at the moment, as far as I can tell, the only well documented and
    consistently applied and interpreted "standard" across browsers is still
    html 4.01.

    I discount html5 as it's still a developing standard.

    See http://www.w3.org/TR/xhtml-media-types/

    Rgds

    Denis McMahon
     
    Denis McMahon, Jul 25, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Winter
    Replies:
    16
    Views:
    1,165
    Steve Pugh
    Apr 27, 2004
  2. mark | r

    strict/transitional Q's

    mark | r, May 10, 2004, in forum: HTML
    Replies:
    11
    Views:
    874
    Spartanicus
    May 10, 2004
  3. Stanimir Stamenkov

    Re: Transitional vs strict vs loose

    Stanimir Stamenkov, Jul 24, 2011, in forum: HTML
    Replies:
    0
    Views:
    377
    Stanimir Stamenkov
    Jul 24, 2011
  4. dorayme
    Replies:
    1
    Views:
    676
    Jukka K. Korpela
    Jul 26, 2011
  5. Gus Richter

    Re: Transitional vs strict vs loose

    Gus Richter, Jul 25, 2011, in forum: HTML
    Replies:
    0
    Views:
    397
    Gus Richter
    Jul 25, 2011
Loading...

Share This Page