www.webdeveloper.com
Results 1 to 5 of 5

Thread: Determining the Doc Type

  1. #1
    Join Date
    Oct 2005
    Posts
    19

    Determining the Doc Type

    It's been about 4 years since I did any web page creation. Upon my return to it, I see Doc Type is a new feature never used when I learned to code html.

    I've looked at the W3C recommended list of doc types, tried using a few I thought were applicable and then ran HTML validator against my URL. Each time I got a message saying I had an invalid doctype.

    I don't know what version of HTML I used and I do use CSS. Wouldn't this be XHTML? Can anyone given me a better way of determining which Doc Type fits my pages? My URL: http://www.juliekcohen.com

    Thank you

  2. #2
    Join Date
    Oct 2005
    Location
    Canada
    Posts
    88

    I think...

    I hope I understood you correctly...you wanted to know if your page is HTML, XHTML, or something else? Well I looked at the source code for your web page and it says:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    So from my observation in appears to be XHTML! I hope that answered your question! If not....I'm really sorry!

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,338
    My recommendation, for what it's worth, is to use the HTML 4.01 Strict doctype unless you have a specific reason to use something else (including XHTML). You can search these forums for lots of threads debating whether you should use XHTML now instead of HTML. So far no one has convinced me I should switch to XHTML if all I want to do is display an HTML page. Here are my default first four lines of every HTML page I create:
    HTML Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html lang='en'>
    <head>
    <META HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=ISO-8859-1'>
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  4. #4
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    Use either HTML 4.01 or XHTML 1.0

    Earlier versions of HTML are superceded by 4.01.
    More recent versions of XHTML are incompatible with current web browsers.
    Stephen

  5. #5
    Join Date
    Oct 2005
    Posts
    19
    Thank you for the help. I have an additional question.

    I added the code NogDog suggested below. Now I see a few pixels in height of red background color from my table at the bottom of my picture which I didn't have before. Do I just have to play around with HTML to avoid this now, or are some things unavoidable?

    Two links within my site to compare and contrast the appearance of the picture are the Home and FAQs pages.

    http://www.juliekcohen.com/

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles