Submit Your Article Forum Rules

+ Reply to Thread
Results 1 to 7 of 7

Thread: DOCTYPE vs. charset=ISO-8859-1

  1. #1
    Junior Member leanbike is an unknown quantity at this point
    Join Date
    Dec 2003
    Posts
    18

    DOCTYPE vs. charset=ISO-8859-1

    if i place
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> at the very top of my html code,
    do i need to add the meta tag charset=ISO-8859-1?
    Never Go Faster than Your Guardian Angel
    lawrence dieter dc
    dc vacation relief
    www.drbackman.com
    (800)797-2457

  2. #2
    Senior Member redcircle is an unknown quantity at this point redcircle's Avatar
    Join Date
    Aug 2003
    Posts
    424
    Yes... the DOCTYPE just tells the browser the rules for the webpage, what kind of javascript to use, what atributes it is allowed to use. etc. The charset is the actual characters that will appear on the screen. Different languages use differnt charsets. example russian characters look much different than english characters. thus they need a different character sets.
    www.squitosoft.com - PHP development site. featuring Squito Gallery. a php driven photo gallery.
    www.rgfx.net - Specializing in Internet solutions, including Html authoring, Interactive Web sites, 3D/2D Graphics and animation.

  3. #3
    Senior Member Narasinha is on a distinguished road Narasinha's Avatar
    Join Date
    Aug 2003
    Posts
    230

    Re: DOCTYPE vs. charset=ISO-8859-1

    Quote Originally Posted by leanbike
    if i place
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> at the very top of my html code,
    do i need to add the meta tag charset=ISO-8859-1?
    There is something else to remember when placing the DOCTYPE tag in your HTML files. The DOCTYPE you use tells the browser what type of HTML/XHTML you are using. Most modern browsers use this for what is called doctype switching. This means the browser will diplay the exact same HTML differently depending on the doctype used. The doctype you posted in your message is incomplete, though I have seen many like it in use all over the web. This means browsers will use what they call "quirks" mode to display your page, rather than using "standards" mode. In other words, the browser assumes that your code is not standard.

    A complete DOCTYPE tag also includes a URI that points to the W3C's Document Type Definition for that particular level of HTML. The full doctype that you should use for HTML 4.01 Transitional is this:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    For a good little article about DOCTYPE tags you might take a look at Fix Your Site With the Right DOCTYPE! at the "A List Apart" web site.

    Narasinha
    - [url=http://unrelated.dexterityunlimited.com/Relatively Unrelated[/url]

  4. #4
    Senior Member carbonize is an unknown quantity at this point
    Join Date
    Jul 2003
    Posts
    522

    Re: DOCTYPE vs. charset=ISO-8859-1

    Quote Originally Posted by Narasinha
    The doctype you posted in your message is incomplete, though I have seen many like it in use all over the web. This means browsers will use what they call "quirks" mode to display your page, rather than using "standards" mode. In other words, the browser assumes that your code is not standard.

    Narasinha
    It is complete and perfectly valid so :p
    Things like the filters that only IE supports only work in quirks mode.

  5. #5
    Senior Member Narasinha is on a distinguished road Narasinha's Avatar
    Join Date
    Aug 2003
    Posts
    230

    Re: DOCTYPE vs. charset=ISO-8859-1

    Quote Originally Posted by carbonize
    It is complete and perfectly valid so :p
    Things like the filters that only IE supports only work in quirks mode.
    Technically, no it's not complete (see W3C QA - List of valid DTDs you can use in your document.), so :P. But, if you really want quirks mode, I suppose it's use an incomplete or a 3.2 or 2.0 (which exclude the URI).

    What filters? Like using alpha-tranparency in PNG images?
    - [url=http://unrelated.dexterityunlimited.com/Relatively Unrelated[/url]

  6. #6
    Senior Member carbonize is an unknown quantity at this point
    Join Date
    Jul 2003
    Posts
    522
    No I mean filters as I have demonstrated on http://www.carbonize.co.uk/Webdesign/css.php in the section marked Internet Explorer 5.5 or later. Also it's interesting to look at the borders I demonstrate on that page in different web browsers.

  7. #7
    Senior Member Narasinha is on a distinguished road Narasinha's Avatar
    Join Date
    Aug 2003
    Posts
    230
    Quote Originally Posted by carbonize
    No I mean filters as I have demonstrated on http://www.carbonize.co.uk/Webdesign/css.php in the section marked Internet Explorer 5.5 or later. Also it's interesting to look at the borders I demonstrate on that page in different web browsers.
    Nice page! The grooved and ridged borders look darker in IE 6 than in Opera 7 for me. Did you notice that the W3C cut "text-shadow" out of CSS2 in the latest revision (2.1)? I guess the browser programmers were having trouble implementing it.

    I have my Opera set to display scrollbar colors, but never use them myself. I remember when I was at a Microsoft Web Developers conference and they talked about the filters. I think IE 5 was in beta at the time. For the alpha-transparency in PNG images you have to use a special filter like this one: filter:progid:DXImageTransform.Microsoft.AlphaImag eLoader. There are some other attributes as well. It's much more complicated than it should be.
    - [url=http://unrelated.dexterityunlimited.com/Relatively Unrelated[/url]

+ Reply to Thread

Similar Threads

  1. What is the purpose of iso-8859??
    By subhzash in forum Web Programming Discussion Forum
    Replies: 10
    Last Post: 03-13-2008, 10:04 AM
  2. Doctype Tag
    By Web Gazelle in forum Web Programming Discussion Forum
    Replies: 5
    Last Post: 01-10-2005, 08:17 AM
  3. DOCTYPE
    By Pi Squared Technologies in forum Web Programming Discussion Forum
    Replies: 2
    Last Post: 12-27-2004, 10:10 AM
  4. Doctype
    By computergenius in forum Flash Discussion Forum
    Replies: 1
    Last Post: 10-27-2004, 06:49 PM
  5. doctype
    By lyas in forum Graphics & Design Discussion Forum
    Replies: 4
    Last Post: 08-28-2004, 06:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts