Login | Register | FAQ
Anonymous

<!DOCTYPE html>

+ Post a reply

4 posts Page 1 of 1


<!DOCTYPE html>

by pavz » Sat Dec 17, 2011 10:17 pm

what is <!DOCTYPE html> it doesn't say in all of tutorials and i really want to know can someone please tell me,
User avatar

pavz

  • Posts: 5
  • Joined: Wed Oct 26, 2011 9:01 pm

Re: <!DOCTYPE html>

by Edward123 » Sun Dec 18, 2011 2:51 am

<!DOCTYPE html>

This is simply the Doctype for HTML5 which is the latest version of html.. But not all browsers are up to date with the latest HTML5 applications.

The Doctype does not validate your JavaScript.

Edward123
User avatar

Edward123

  • Posts: 89
  • Joined: Wed Oct 05, 2011 7:57 pm

Re: <!DOCTYPE html>

by chrisf1288 » Sun Dec 18, 2011 3:06 am

Yupp. The doctype tells the browser what markup language the code is written in. It is needed for your website to be validated correctly. In previous versions of HTML, your doctype would look something like this:

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


But now in HTML5 its just <!DOCTYPE html>!!!
User avatar

chrisf1288

  • Posts: 128
  • Joined: Sun Jun 26, 2011 1:01 am

Re: <!DOCTYPE html>

by atik » Sun Dec 18, 2011 8:27 am

Hi pavz,
As wikipedia says about doctype
A Document Type Declaration, or DOCTYPE, is an instruction that associates a particular SGML or XML document (for example, a webpage) with a Document Type Definition (DTD) (for example, the formal definition of a particular version of HTML). In the serialized form of the document, it manifests as a short string of markup that conforms to a particular syntax.

For more info on doctype you can visit w3school,
HTML <!DOCTYPE> Declaration
HTML5 <!DOCTYPE> Declaration
User avatar

atik

  • Posts: 472
  • Joined: Mon Oct 17, 2011 4:55 pm

Re: <!DOCTYPE html>

by pavz » Sun Dec 18, 2011 12:06 pm

thanks guys!
User avatar

pavz

  • Posts: 5
  • Joined: Wed Oct 26, 2011 9:01 pm


+ Post a reply

Page 1 of 1