Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS doctype

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #37994
    vrachu
    Member

    if we didnt use doctype in a html document what are the difficulties we will face? why we have to use doctype

    #102566
    Senff
    Participant

    That’s like asking, if you didn’t use a windshield in your car, what are the difficulties you will face….?

    Why WOULDN’T you? Really, every page needs one. Without it, you’ll confuse browsers.

    #102572
    SgtLegend
    Member

    Bottom line is without one that runs in standards mode you will face a long road of getting things to work properly in IE.

    #102573
    Anonymous
    Inactive

    The difficulties you will face is that HTML and CSS implementations have changed over the years. DOCTYPE tells the browser which implementation you have designed your website with, and therefore how it should render your page content. Without a DOCTYPE, browsers will revert to default.

    For some, like Opera, the browser will render it in the up-to-date format, so if you are using modern standards, Opera users will see it fine. Others, will not be so generous. You run the risk of falling into “Quirks” mode — a legacy of a bygone era where web designers wrote websites for specific browsers instead of to the specifications (note, the specifications weren’t as well documented as they are today). Many browsers will assume that a page without a DOCTYPE is one of these old fashioned pages, and will render it the way those designers would have expected.

    Given the lack of effort needed, just use and be done with it.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.