Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Re: Transitional vs strict vs loose

Reply
Thread Tools

Re: Transitional vs strict vs loose

 
 
j
Guest
Posts: n/a
 
      07-24-2011
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
 
Reply With Quote
 
 
 
 
Denis McMahon
Guest
Posts: n/a
 
      07-25-2011
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
 
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
Re: Transitional vs strict vs loose dorayme HTML 1 07-26-2011 05:27 AM
Re: Transitional vs strict vs loose Gus Richter HTML 0 07-25-2011 02:13 AM
Re: Transitional vs strict vs loose Stanimir Stamenkov HTML 0 07-24-2011 02:43 PM
strict/transitional Q's mark | r HTML 11 05-10-2004 01:20 PM
XHTML bug? Transitional/Strict Rendering Issues Dave Winter HTML 16 04-27-2004 07:21 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57