Web Analytics Made Easy -
StatCounter question for html & CSS - CodingForum

Announcement

Collapse
No announcement yet.

question for html & CSS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • question for html & CSS

    in layout css , if remove
    <!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">
    and replace
    <html>
    , what the happen ?

    and between
    <!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">
    and
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    what different ?
    sorry because my english not okie , sorry , thanks you very much

  • #2
    A doctype tells the browser how it should render the page. Without one you'll find browsers will interpret coding differently and it will make life very hard when trying to get your page looking 'right' amongst all browsers! You need a doctype to have a valid page; don't ever leave it out .

    As for the difference between XHTML and HTML, have a quick glance at http://www.w3schools.com/xhtml/xhtml_html.asp . XHTML is basically the next step from HTML and is rapidly replacing it, a lot of tags from HTML are deprecated in XHTML (say goodbye to <font> and <center> !) and there is a much stronger emphasis on seperating style from content. Googling the differences between them will reveal many sites which should go into more detail about it.
    markaylward.co.uk

    Comment

    Working...
    X