<doctype> vs namespace

D

don

If a <doctype> tells the browser what version of HTML is being used for the
web site what is a namespace telling it? Why do we need both?
 
J

Jukka K. Korpela

If a <doctype> tells the browser what version of HTML is being used

It does not.
what is a namespace telling it?

It's telling that tags are HTML tags and not FunML or BurpML ot HotSexML
tags, to those user agents that care about such things.
Why do we need both?

What makes you think you need either of them?
 
J

Jukka K. Korpela

2012-04-25 14:06 said:
<!DOCTYPE> is not the tag of the HTML but it is must to be mentioned
above the HTML tag because it is used to instruct the browser about
version of the HTML in which the page has been written

Do you really think so? Did you *ever* test the idea?

Try writing a document with all kinds of modern tags and slap an HTML
2.0 doctype at the start. Do you think browsers will then refuse to
recognize the modern tags? Did you really expect that to happen? What
*do* you mean my “instruct the browser about version of the HTML†if not
such things?
whereas
namespace is used conflict between element names to avoid.

Exactly how would a namespace declaration be an HTML thing, given that
there is a single HTML namespace?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top