WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1 What is DOCTYPE? on Wed Dec 30, 2009 8:20 am

karna


Registered Member
Registered Member
Why do we need to give a doctype? Cant browsers render properly without them?

2 Re: What is DOCTYPE? on Wed Dec 30, 2009 11:04 am

ankillien


Administrator
Administrator
A doctype is telling the browser what type of code you have (HTML 4.01 Strict, HTML 4.01 Quirks Mode, XHTML 1.1 Strict, XHTML 1.1 Transitional, etc.) This will change the way the browser looks at the code, and how it renders it.

3 Re: What is DOCTYPE? on Thu Dec 31, 2009 7:32 pm

karna


Registered Member
Registered Member
Thanks for the info ankillien. I wonder how come pages work properly even without a doctype?
I have seen many pages that have no doctype but they work properly in browser.

4 Re: What is DOCTYPE? on Sat Jan 02, 2010 7:45 am

ankillien


Administrator
Administrator
If you don't have a doctype, it assumes HTML 4.01 Transitional.
And thats why it work properly for most pages Razz

5 Re: What is DOCTYPE? on Wed Jan 11, 2012 3:12 pm

bryanbell


Registered Member
Registered Member
DocType is used to declare the type of document. You cannot say that DocType is an HTML or XML element. The declaration of DocType is always on very top of the documents.

For i.e.

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

http://www.spinxwebdesignflorida.com/

6 Re: What is DOCTYPE? on Thu Mar 15, 2012 3:04 pm

lailagwb


Banned Member
Banned Member
The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag.

The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.

The <!DOCTYPE> declaration refers to a Document Type Definition (DTD). The DTD specifies the rules for the markup language, so that the browsers render the content correctly.

Tip: Always add the <!DOCTYPE> declaration to your HTML documents, so that the browser knows what type of document to expect.

http://www.gowebbaby.com/

View previous topic View next topic Back to top  Message [Page 1 of 1]

Similar topics

-

» HTML Doctype

Permissions in this forum:
You cannot reply to topics in this forum