/    Sign up×
Community /Pin to ProfileBookmark

Whats the lastest DOCTYPE

I want the lastest doctype can someone please help.

What DOCTYPE should i use?

should i use…

[code]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN”
“http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>
[/code]

or…

[CODE]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>[/CODE]

to post a comment
HTML

34 Comments(s)

Copy linkTweet thisAlerts:
@NogDogFeb 19.2006 — Well, XHTML 1.1 is later than XHTML 1.0, though that doesn't necessarily mean you should want/need to use it (or for that matter that you shouldn't just use HTML 4.01, but that's a whole other debate).

Here's w3.org's list of recommended doctypes: http://www.w3.org/QA/2002/04/valid-dtd-list.html
Copy linkTweet thisAlerts:
@the_treeFeb 19.2006 — [SIZE=9]Being [U]new[/U] [I]is not synonymous[/I] with being [U]good[/U].[/SIZE]
Copy linkTweet thisAlerts:
@johnevaFeb 19.2006 — Aup

Why the big words the tree?

What do you even mean?
Copy linkTweet thisAlerts:
@the_treeFeb 19.2006 — Why the big words the tree?[/quote]Because it's important.
What do you even mean?[/QUOTE]Pretty much as I say, being the most recent doesn't make something the best. There's plenty of new things that are either useless for the task at hand, or generally crappy.
Copy linkTweet thisAlerts:
@johnevaFeb 19.2006 — Ah right I get ya,

Yes very true.

Sorry I am just a little less educated than yourself and did not have a clue what you were saying.
Copy linkTweet thisAlerts:
@prowebmasterauthorFeb 20.2006 — Thankyou for your replies =P. But Tree do you mean XHTML 1.1 sucks or what?

O well im just going to use XHTML 1.1.
Copy linkTweet thisAlerts:
@drhowarddrfineFeb 20.2006 — O well im just going to use XHTML 1.1.[/QUOTE] Ok. How are you going to modularize your html? How much of XML are you going to use? SVG, too? I guess you are planning on your site being output to many different devices, hence the choice of xhtml1.1

But, wait a minute. IE doesn't work with xhtml. So I guess you are only using Firefox/Opera/Safari/Camino. And your server probably only outputs html/text, too and not xhtml. So, wtf?
Copy linkTweet thisAlerts:
@KravvitzFeb 20.2006 — [url=http://www.sitepoint.com/forums/showthread.php?t=320391]XHTML 1.0 vs XHTML 1.1[/url]

[url=http://www.hixie.ch/advocacy/xhtml]Sending XHTML as text/html Considered Harmful[/url]

[url=http://keystonewebsites.com/articles/mime_type.php]Serving up XHTML with the correct MIME type[/url]

http://www.w3.org/2003/01/xhtml-mimetype/

http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html

http://www.w3.org/TR/xhtml-media-types/#summary
Copy linkTweet thisAlerts:
@prowebmasterauthorFeb 20.2006 — ok so there is XHTML 2? wtf i didn't even know this should i use.

Can i use it?

Should i use it?

Should i use XHTML or HTML?

Im getting confused :S

Some1 please help im not sure what i should use

PS: Is XHTML 1.0 the next one from html 4?
Copy linkTweet thisAlerts:
@CharlesFeb 20.2006 — All of those different versions of HTML and XHTML are for different uses. What exactly are you trying to accomplish? If you just want a web page then use HTML 4.01 Strict.
Copy linkTweet thisAlerts:
@KravvitzFeb 20.2006 — I agree with Charles.

[url=http://www.sitepoint.com/forums/showthread.php?t=268650]Should I switch to xhtml?[/url]

[url=http://www.sitepoint.com/forums/showthread.php?t=251158]Use XHTML or HTML 4.01 Doctype?[/url]

[url=http://www.sitepoint.com/forums/showthread.php?t=230648]What are the purposes of XHTML?[/url]

[url=http://www.sitepoint.com/forums/showthread.php?t=219815]XHTML 1.0 or HTML 4.01 Strict?[/url]

[url=http://www.sitepoint.com/forums/showthread.php?t=223647]Why XHTML? What is the point?[/url]

[url=http://www.sitepoint.com/forums/showthread.php?t=235486]<br> vs. <br />[/url]

[url=http://www.sitepoint.com/forums/showthread.php?t=278434]xhtml vs html[/url]

[url=http://www.sitepoint.com/forums/showthread.php?t=288694]XHTML vs HTML[/url]

[url=http://forums.devshed.com/html-programming-1/xhtml-vs-html-180022.html].xhtml vs .html[/url]

[url=http://forums.devshed.com/web-design-help-2/please-stop-recommending-xhtml-to-newbies-sort-of-rant-310118.html]Please stop recommending XHTML to newbies (sort of rant)[/url]

[url=http://www.iwdn.net/showthread.php?t=2507]Teach me XHTML[/url]
Copy linkTweet thisAlerts:
@johnevaFeb 20.2006 — I also agree with charles.
Copy linkTweet thisAlerts:
@prowebmasterauthorFeb 21.2006 — I also agree with charles but not fully as i do not know what XHTML is exactly for?


All of those different versions of HTML and XHTML are for different uses. What exactly are you trying to accomplish? If you just want a web page then use HTML 4.01 Strict.
[/QUOTE]


What is XHTML for then?

and what is the difference between MIME text/html and application/html+xml

and also some source from www.w3.org (home page)


<?xml version="1.0" encoding="utf-8"?>

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

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">

<head profile="http://www.w3.org/2000/08/w3c-synd/#"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />[/QUOTE]


If www.w3.org uses XHTML 1.0 strict i'll use it too.

lol it seems to me that XHTML is the new HTML so why should i learn old code, then find out i have to to learn XHTML at a later date anyway?

I find it point less to use HTML 4.01 (unless HTML is going to goto to just say HTML 5)

Just an opinion =P

Cheers
Copy linkTweet thisAlerts:
@pcthugFeb 21.2006 — W3c suggest using xhtml as it's there way of slowly cleaning up the web; forcing web developers to use a much more strict and clean syntax - therefore no html 5, however this is no reason not to still learn and develop in the latest html recommendation
Copy linkTweet thisAlerts:
@johnevaFeb 21.2006 — HTML is better for you at the min cos it is easier to learn and use if your new and there is better support for it.

As for having to lean XHTML after you have learnt HTML it is easy to adjust your coding from HTML to XHTML anyways, but to learn XHTML from the start could be a little annoying as many of the old tags and methods of doing things carnt be done in XHTML.

CSS is important though I hate seeing coding pages the are full of styles in with there HTML/XHTML. It make the coding so messy and hard to read/edit also the old style tag s like <font> and <center> and a few more should not be used anymore.

But anyways thats not what this thread was about, unless you have good reason not to I would use HTML to start with.
Copy linkTweet thisAlerts:
@felgallFeb 21.2006 — Using XHTML and CSS together the way they are meant to be used you can do 800% of what could be done with HTML 3.2. With HTML 4 everything is deprecated that XHTML 1.0 has deprecated and so there is no difference between the two except for a few extra closing slashes in singleton tags.

(X)HTML defines the content of your page. CSS defines how that content is to appear on the page.
Copy linkTweet thisAlerts:
@johnevaFeb 21.2006 — Using XHTML and CSS together the way they are meant to be used you can do 800% of what could be done with HTML 3.2. With HTML 4 everything is deprecated that XHTML 1.0 has deprecated and so there is no difference between the two except for a few extra closing slashes in singleton tags.

(X)HTML defines the content of your page. CSS defines how that content is to appear on the page.[/QUOTE]


You can still use the embed tag with HTML though carnt you?

XHTML you carnt which causes probems with doing some stuff.

I though that there was other stuff like that too.

But I dont know I am still new myself anyways.

I have made a site in XHTML and HTML(and just though HTML was easier for newbies), and I always use an external styles sheet. so no need to tell me what it is for dude.

Thats why I was recomending the use of CSS cos I hate to see pages not using CSS (Preferably external file).
Copy linkTweet thisAlerts:
@CharlesFeb 21.2006 — XHTML you carnt which causes probems with doing some stuff.[/QUOTE]That's completely wrong. XHTML 1.0 comes in the same three flavours as HTML 4.01. Each flavour has the same elements and attributes be it XHTML or HTML.

There is way much ignorance about XHTML out there and most seem to have attributed to it all of the advantages of HTML 4.01 Strict. HTML 4.01 Strict will run on the most number of browsers. XHTML 1.0 transitional on the least. HTML 4.01 transitional and XHTML 1.0 strict are both in the middle. The sad thing is that the world seems full of people who are using the least accessible mark up thinking that they are using the most accessible.
Copy linkTweet thisAlerts:
@johnevaFeb 21.2006 — Well considering I have only been doing web pages for 6 months now and only been using a computer for a year now.

I dont think ignorance has anything to do with it.

If I am not clear on something that is cos it has not been clear when I have been learning.

So many people have diffrent opinions on things it is hard to know what is right and wrong sometimes.

But anyways cheers for clearing that up for me fella.

At least I now know that the only problem with XHTML is browser support for it.
Copy linkTweet thisAlerts:
@MstrBobFeb 21.2006 — This is a much discussed, and much debated issue in web development. There also tends to be a lot of misinformation on both sides.

[URL=http://neal.venditto.org/articles/21/the-xhtml-files/]The X(HTML)-Files[/URL]

[URL=http://neal.venditto.org/articles/60/html-and-xhtml-revisited/]HTML and XHTML Revisited[/URL]

My personal opinion is that, at this point, for your basic HTML page you are best off with HTML 4.01 Strict. There are important differences between HTML and XHTML, and it's not simply a matter of "Which is the latest?"
Copy linkTweet thisAlerts:
@KravvitzFeb 22.2006 — Well said, MstrBob.

With HTML 4 everything is deprecated that XHTML 1.0 has deprecated and so there is no difference between the two except for a few extra closing slashes in singleton tags.[/QUOTE]
That's oversimplifying it. Besides things like XHTML being case-sensitive , cdata sections, etc. there are other subtle differences like HTML 4.01 Strict allowing the name attribute on form elements, while XHTML 1.0 Strict no longer allows it.

[QUOTE=felgall](X)HTML defines the content of your page. CSS defines how that content is to appear on the page.[/QUOTE]

Too bad more people don't know that.
Copy linkTweet thisAlerts:
@CharlesFeb 22.2006 — Well said, MstrBob.


That's oversimplifying it. Besides things like XHTML being case-sensitive , cdata sections, etc. there are other subtle differences like HTML 4.01 Strict allowing the name attribute on form elements, while XHTML 1.0 Strict no longer allows it.


Too bad more people don't know that.[/QUOTE]
In felgall's defence, HTML also has CDADA sections and HTML 4 doesn't allow the name attribute on FORM elements. HTML 4, however, was superceded by HTML 4.01 which does allow that useless attribute. But there are other differences and some of the diferences make XHTML [i]incompatable[/i] with HTML browsers. Differences like external entities and the different way the TBODY element is handled.
Copy linkTweet thisAlerts:
@KravvitzFeb 22.2006 — HTML also has CDADA sections[/QUOTE]
True, I suppose it does, but it doesn't use the special designators that are used in XHTML to identify them.

HTML 4 doesn't allow the name attribute on FORM elements. HTML 4, however, was superceded by HTML 4.01 which does allow that useless attribute.[/QUOTE]
I wasn't aware of that. Thanks for enlightening me. ?

I wouldn't say that the name attribute on form elements is useless. It allows the use of the DOM0 forms[] collection.
Copy linkTweet thisAlerts:
@CharlesFeb 22.2006 — True, I suppose it does, but it doesn't use the special designators that are used in XHTML to identify them.[/QUOTE]On the contrary it does, but as with several other features of HTML it is not well supported by browsers. See http://www.w3.org/TR/REC-html40/appendix/notes.html#sgmlfeatures .
Copy linkTweet thisAlerts:
@CharlesFeb 22.2006 — I wouldn't say that the name attribute on form elements is useless. It allows the use of the DOM0 forms[] collection.[/QUOTE]??? The DOM0 forms[] collection works without form names.
Copy linkTweet thisAlerts:
@KravvitzFeb 22.2006 — Sure, you could use the numerical indices. I don't think it works with IDs.

Thanks for the link. Apparently most people, including myself, don't know HTML as well as they think they do.
Copy linkTweet thisAlerts:
@felgallFeb 23.2006 — HTML 4 strict and XHTML 1 strict are equivalent except for the closing slashes for the singleton tags. There are no extra tags supported by one and not the other as the one was a translation of the other into an XML format. Neither is easier or harder to learn to code properly as the differences in the code are very minor. If both were served as HTML then browsers would treat them identically. The problem comes with serving XHTML as XML instead of HTML because IE doesn't understand it if you do that.

It doesn't matter which of these two that you use to code your pages as adding the extra slashes to convert to XHTML can be easily done later.

There are differences in the way that Javascript works between HTML and XML so bigger changes will be required in your scripts rather than in your markup when you finally convert them to XML.
Copy linkTweet thisAlerts:
@KravvitzFeb 24.2006 — Well said felgall. ?

You did omit that HTML 4 Strict is not quite the same as HTML 4.01 Strict, which is what most people would actually be using.
Copy linkTweet thisAlerts:
@CharlesFeb 24.2006 — Well said felgall.[/QUOTE]As is typical, this felgall is completely wrong about this.

[b]Charles's Little List of Differences[/b]

[i]I expect that I've missed a few.[/i]

  • - HTML has a default encoding of iso-8859-1. XHTML has a default encoding of utf-8/utf-16.

  • - In HTML the default encoding can be overridden by HTTP header or META element. In XHTML the default encoding is overridden by the XML declaration processing instruction.

  • - Certain white space characters that are legal in HTML are not legal in XHTML.

  • - HTML browsers have trouble with processing instructions. XHTML uses them for several purposes and allows them as suits the web authors' needs.

  • - HTML browsers are instructed to do the best that they can with a page. XHTML browsers are required to read the DTD and throw an error when a deviation is encountered.

  • - Lots of things in SGML that also exist in XML were never adopted by HTML browsers. XHTML browsers are expected to support them. This includes external entities, CDATA sections and the like.

  • - In HTML all element names are upper case and all attribute names are lower case. In XHTML both are lower case.

  • - HTML element and attribute names are all case insensitive. XHTML element and attribute names are all case sensitive.

  • - XHTML elements are all a part of a name space and the declaration is required. There are no P elements, they are all really http://www.w3.org/1999/xhtml:p elements.

  • - HTML supports optional tags for certain elements. You can omit the start and end tags for the HTML element and the browser will internally represent the element nonetheless. Likewise, you can omit the closing P tag and since the P element cannot contain a block level element the browser will close the element when one is encountered. XHTML requires all tags.

  • - In HTML with the TABLE element the TBODY element is required but its tags are optional. In XHTML the element is optional. This means that the same tags will create different document trees in HTML and XHTML. And this has important implications for JavaScript and CSS.

  • - In XHTML all elements must be closed.

  • - In HTML both of the following are illegal but both are legal in XHTML: [font=monospace]<br></br>[/font] and [font=monospace]<div/>[/font]

  • - In HTML STYLE and SCRIPT elements take CDATA. In XHTML the xhtml:style and xhtml:script elements take PCDATA.

  • - In XHTML browsers are allowed to ignore everything inside of comments. This includes styles and scripts.

  • - There is a trivial difference concerning comments.

  • - HTML does not allow line breaks in attribute values. XHTML does.

  • - HTML allows, and some browsers require, boolean attribute minimization. XHTML forbids it.

  • - XHTML supports the xml:lang attribute.

  • - In HTML fragment identifiers in URLs can refer to name attributes. In XHTML they cannot. And note, the values for names and ids have different restrictions.

  • - In XHTML the name attribute has been depricated for xhtml:a, xhtml:applet, xhtml:form, xhtml:frame, xhtml:iframe, xhtml:img, and xhtml:map elements.

  • - XHTML inherits from XML the character entity &apos;. HTML does not support this.
  • Copy linkTweet thisAlerts:
    @johnevaFeb 24.2006 — Steady Charles!

    These forums can get so heated sometimes.

    And a little list I would hate to see the big one.

    Hehehehe
    Copy linkTweet thisAlerts:
    @MstrBobFeb 24.2006 — Let's avoid personal attacks here, okay?

    Though I will agree with Charles on his point that the issue is NOT as clear cut as many make it out to be. There are numerous issues, as was pointed out, that can cause a lot of headaches if you don't know about them. SGML and XML are different beasts. HTML and XHTML come from SGML and XML respectively, and so inherit the differences between SGML and XML. Now while most of the differences are minor, they shouldn't be ignored. If you are doing some medium to advanced scripting or styling, or are working on international support, it's been my experience that ignorance of these differences can cause a bunch of issues to pop up. Don't say XHTML 1.0 is simply HTML 4.01 with forward slashes on single tags.

    Sometimes I wonder if the W3C made a mistake giving XHTML 1.0 the same element and attribute names as HTML 4.01. Perhaps if they had gone for the simplification that they are currently aiming for in XHTML 2.0, developers would be more aware of these issues.


    If you really don't think this is an issue, try some moderately complicated client scripting. For instance, when I was working on an [URL=http://neal.venditto.org/articles/65/svg-whiteboard/]SVG Whiteboard[/URL], namespaces and CDATA sections suddenly became very important. As did requiring that everything be well-formed. Of course, for the headaches it may cause you when you are learning it, it makes a lot more things possible. I could not make that SVG Whiteboard in HTML the way it is. I would have to make considerable, more hacky changes.
    Copy linkTweet thisAlerts:
    @CharlesFeb 24.2006 — Sometimes I wonder if the W3C made a mistake giving XHTML 1.0 the same element and attribute names as HTML 4.01.[/QUOTE]Strictly speaking, they didn't. For instance, they changed the P element to a xhtml:p element.

    XSLT is another good place to watch out for those namespaces.
    Copy linkTweet thisAlerts:
    @MstrBobFeb 24.2006 — Strictly speaking, they didn't. For instance, they changed the P element to a xhtml:p element.

    XSLT is another good place to watch out for those namespaces.[/QUOTE]


    Setting the namespace and case-sensitivity aside (which is important to the computer) the names haven't changed, which is enough to confuse the human developers. Either that, or a lack of good tutorials explaining this. Because a lot of people find the technical docs hard to follow (very understandable) and prefer tutorials of one sort or another (I usually do). But most all of them are very innacurate, leading to a lot of confusion.

    I know I've talked about the need for a good HTML + CSS tutorial before, but I'm starting to think about compiling one for the HTML to XHTML switch. Because web developers are knowledgeable enough to be dangerous, heh. I should do it, these things are always good learning experiences for the writer as well. It would do me good to have another read through the Documentation.
    Copy linkTweet thisAlerts:
    @CharlesFeb 24.2006 — Well, Apendix C to the XHTML 1.0 spec sort of is a tutorial for moving a document from HTML to XHTML. And it has sort of entered into the zeitgeist - except that a lot of really important stuff gets omitted. But I think that the project itself is the problem. As long as you are thinking about converting HTML to XHTML you are thinking about the intersection of the two. You're thinking about a third, hybrid mark up language. And there's nothing wrong with that except that what's true for that hybrid isn't true for the rest of XHTML - or for the rest of HTML either.

    But that HTML/XHTML hybrid isn't interesting. It can't do anything that HTML does better. However, the rest of XHTML, that part that is incompatable with HTML, is quite interesting and quite powerful. I'd like to see a good tutorial on XHTML and what it can do that only speaks about HTML as an Appendix.
    ×

    Success!

    Help @prowebmaster 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 6.17,
    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: @nearjob,
    tipped: article
    amount: 1000 SATS,

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

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...