/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] DOCTYPE tags

Do you think DOCTYPE tags will ever become mandatory?

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@CharlesJan 04.2007 — They already are.
Copy linkTweet thisAlerts:
@disgracianJan 04.2007 — Pages work without them; though sometimes not as well.

Cheers,

D.
Copy linkTweet thisAlerts:
@felgallJan 04.2007 — You can't have a proper web page without a doctype. A doctype is mandatory if you want a web page that is valid and which will display the same in all browsers.

Without a doctype some browsers will still display the page while others wont and those that do will all display it differently so that you can only ever get the page to look right in one browser unless you use a doctype.

Doctypes have existed and been a mandatory requirement of valid web pages since HTML 2.0. It is just that some browsers try to display web pages even though they have left out mandatory tags. They each make different assumptions in that instance though.
Copy linkTweet thisAlerts:
@yodasw16Jan 04.2007 — Yes, to be valid it is mandatory, but I think this person was asking if the time will ever come when a page MUST have a DTD or else it wont display [i]at all[/i].

The answer is more than likely no. Browser developers tend to do whatever they want and will likely never conform to a set of universal rules. Look at IE for gosh sake. I think the thought is that they want to create browsers that can read any code, not just good code, since as we know most people don't write good code. The whole web would crash if browsers [i]required[/i] perfect code.
Copy linkTweet thisAlerts:
@felgallJan 04.2007 — Yes but without the DOCTYPE each browser decides for itself how it is going to display a page and so while pages without a doctype will display in most browsers the page will look different in each one. The first step in getting the page to look the same in all browsers is to include the doctype.
Copy linkTweet thisAlerts:
@drhowarddrfineJan 04.2007 — XML has a whole slew of different doctypes for many different industries to define elements unique to their interests and activities.
Copy linkTweet thisAlerts:
@AscendancyauthorJan 05.2007 — Yes but without the DOCTYPE each browser decides for itself how it is going to display a page and so while pages without a doctype will display in most browsers the page will look different in each one. The first step in getting the page to look the same in all browsers is to include the doctype.[/QUOTE]
Oh, right that makes sense. Thanks everybody for your help!
×

Success!

Help @Ascendancy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...