+ Reply to Thread
Results 1 to 6 of 6

Thread: Document type?

  1. #1
    focus is offline x10 Sophmore focus is an unknown quantity at this point
    Join Date
    Feb 2008
    Posts
    112

    Document type?

    I'm just wondering what document type should i be using? At the moment im using:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

  2. #2
    kiano77 is offline x10Hosting Member kiano77 is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    2

    Re: Document type?

    I'm using:
    !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

  3. #3
    ciril tomy's Avatar
    ciril tomy is offline x10Hosting Member ciril tomy is an unknown quantity at this point
    Join Date
    Jul 2009
    Location
    TOKYO, JAPAN
    Posts
    53

    Thumbs up Re: Document type?

    Hope It would be helpful...

    XHTML is a stricter and cleaner version of HTML.
    Use XHTML coding it's the better than HTML...

    XHTML is a combination of HTML and XML


    You can checkout the major difference between three XHTML types.

    Document Type Definitions (DTD)

    • A DTD specifies the syntax of a web page in SGML
    • DTDs are used by SGML applications, such as HTML, to specify rules for documents of a particular type, including a set of elements and entity declarations
    • An XHTML DTD describes in precise, computer-readable language, the allowed syntax of XHTML markup
    There are three XHTML DTDs:
    • STRICT
    • TRANSITIONAL
    • FRAMESET
    XHTML 1.0 Strict

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Use the strict DOCTYPE when you want really clean markup, free of presentational clutter. Use it together with CSS.
    XHTML 1.0 Transitional

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Use the transitional DOCTYPE when you want to still use HTML's presentational features.
    XHTML 1.0 Frameset

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> Use the frameset DOCTYPE when you want to use HTML frames.
    Edit:
    Major Differences b/w HTML&XHTML:

    • XHTML elements must be properly nested
    • XHTML elements must always be closed
    • XHTML elements must be in lowercase
    • XHTML documents must have one root element

    XHTML Elements Must Be Properly Nested

    In HTML, some elements can be improperly nested within each other, like this:
    <b><i>This text is bold and italic</b></i> In XHTML, all elements must be properly nested within each other, like this:
    <b><i>This text is bold and italic</i></b> Note: A common mistake with nested lists, is to forget that the inside list must be within <li> and </li> tags.
    This is wrong:
    <ul>
    <li>Coffee</li>
    <li>Tea
    <ul>
    <li>Black tea</li>
    <li>Green tea</li>
    </ul>
    <li>Milk</li>
    </ul> This is correct:
    <ul>
    <li>Coffee</li>
    <li>Tea
    <ul>
    <li>Black tea</li>
    <li>Green tea</li>
    </ul>
    </li>
    <li>Milk</li>
    </ul> Notice that we have inserted a </li> tag after the </ul> tag in the "correct" code example.
    XHTML Elements Must Always Be Closed

    Non-empty elements must have a closing tag.
    This is wrong:
    <p>This is a paragraph
    <p>This is another paragraph This is correct:
    <p>This is a paragraph</p>
    <p>This is another paragraph</p>
    Empty Elements Must Also Be Closed

    Empty elements must also be closed.
    This is wrong:
    A break: <br>
    A horizontal rule: <hr>
    An image: <img src="happy.gif" alt="Happy face"> This is correct:
    A break: <br />
    A horizontal rule: <hr />
    An image: <img src="happy.gif" alt="Happy face" />
    XHTML Elements Must Be In Lower Case

    Tag names and attributes must be in lower case.
    This is wrong:
    <BODY>
    <P>This is a paragraph</P>
    </BODY> This is correct:
    <body>
    <p>This is a paragraph</p>
    </body>
    XHTML Documents Must Have One Root Element

    All XHTML elements must be nested within the <html> root element. Child elements must be in pairs and correctly nested within their parent element.
    The basic document structure is:
    <html>
    <head> ... </head>
    <body> ... </body>
    </html>
    Last edited by ciril tomy; 09-26-2009 at 08:29 AM. Reason: Automerged Doublepost

  4. #4
    ichwar's Avatar
    ichwar is offline Community Advocate ichwar is an unknown quantity at this point
    Join Date
    Dec 2008
    Location
    NC, USA
    Posts
    1,454

    Re: Document type?

    Yes, I think you should be using an xhtml doc type. It's going to become a web standard sooner or later, so why not get on the ball early.

  5. #5
    sourfacedcyclop's Avatar
    sourfacedcyclop is offline x10 Sophmore sourfacedcyclop is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    221

    Re: Document type?

    I use XHTML strict. XHTML is far far cleaner than HTML and once you get the hang if it is a lot easier to use.
    "Sanity is nothing but our interpretation of reality"

    http://tswebvisions.com - Portfolio

  6. #6
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: Document type?

    As things are going now, even if xhtml 2 got stopped in development, HTML 5 reuses concepts of xhtml. (and code in xhtml just looks cleaner)
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

+ Reply to Thread

Similar Threads

  1. Different Types of Affiliate Marketing
    By dWhite in forum Earning Money
    Replies: 1
    Last Post: 03-02-2009, 06:43 AM
  2. Document editor like google docs
    By galaxyAbstractor in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 05-10-2008, 02:22 PM
  3. XHTML help please
    By mac173 in forum Graphics & Webdesign
    Replies: 3
    Last Post: 01-29-2008, 11:39 AM
  4. FTP Problem
    By R3DN1T3 in forum Free Hosting
    Replies: 2
    Last Post: 11-09-2006, 11:12 PM
  5. What is XML!
    By wizeman in forum Tutorials
    Replies: 6
    Last Post: 08-27-2005, 12:05 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
x10hosting free hosting for the masses
dedicated servers