Forum Moderators: not2easy

Message Too Old, No Replies

Char set in CSS

Which one is the best to use and why?

         

flaxmac

7:38 am on Jun 29, 2005 (gmt 0)

10+ Year Member



Could anyone tell me which is the best Charset and or Doctype to use with CSS.

bill

8:06 am on Jun 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That can depend on what language you were targeting for the charset. A lot of people prefer UTF-8 now for its flexibility across languages.

The doctype is a preference which depends on your coding ability and site mechanics.

flaxmac

8:21 am on Jun 29, 2005 (gmt 0)

10+ Year Member



Let's, for arguments sake, say that my coding ability was not that good, (it's not true ofcourse, some people call me the "Q-coder King", Q standing for Quirky)
But anyway on a serious note, I am using the following:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>XXXXXXXX</title>
<meta name="description" content="#*$!#*$! rrrrrr sssss.">
<meta name="keywords" content="ooooxxxx oooxxxx yyyy wwww">
<style type="text/css" media="screen">@import url("Teach-English-Korea.css");</style>
</head>

I am using the @import to block the css for older browsers, great tip that I picked up here.
Whats the difference between loose and strict with the:

"http://www.w3.org/TR/html4/loose.dtd"

I have seen really good sites that what ever browser I open them in they look great and keep their same shape and feel. But my site seems to go bad sometimes. Any tips for keeping it clean and clear?