Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 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
    Senior Coder
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    2,636
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

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