This forum is now read-only. Please use our new forums at discuss.codecademy.com.

HTML Basics Forum

View Course » View Exercise

321 points
053b72686ced3564ecbb512b3c5e1674?s=140&d=retro
Submitted by
bobbysmith
over 4 years ago

'!DOCTYPE html' or 'html' '/html'? Why both?

Here is a quote from the lesson:

a. Always put '!DOCTYPE html' on the first line. This tells the browser what language it's reading (in this case, HTML).
b. Always put 'html' on the next line. This starts the HTML document.

What is the difference between "telling the browser what language it's reading" and "starting the HTML document"?

If there is any explanation, please incorporate that explanation into this lesson.


1 vote

permalink

your will get your ans here : http://www.w3schools.com/tags/tag_doctype.asp

779 points
51a5e155c4b2bb4ea90032e9_406448259
Submitted by
Don Ale
over 4 years ago

1 Comment

053b72686ced3564ecbb512b3c5e1674?s=140&d=retro bobbysmith over 4 years ago

Thanks, but unfortunately it doesn't tell me what a DTD is, so it's still not completely clear.


1 vote

permalink

Information about DTD, here: http://www.w3schools.com/dtd/default.asp

779 points
51a5e155c4b2bb4ea90032e9_406448259
Submitted by
Don Ale
over 4 years ago

1 Comment

053b72686ced3564ecbb512b3c5e1674?s=140&d=retro bobbysmith over 4 years ago

Thanks.


0 votes

permalink

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

365 points
543fc82f631fe988640020d7_382532424
Submitted by
Tobias Páez
about 3 years ago


0 votes

permalink

A browser understands many other coding languages besides HTML(like JavaScript).
Any html command will cause the browser to recognize HTML. You must first use DOCTYPE to start the doc.

1210 points
Fb6f13fcbef596b703d337caf56196d0?s=140&d=retro
Submitted by
Joel.Miles925
almost 3 years ago