Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which doctype should I use?

Tags:

html

Which doctype should I use, if I want to use costumizable divs. With divs animation, images moving, setting div opacity, etc.

I've tried to create a div through javascript, setting its background-color, position, width and height, and adding an onmouseover event to it.

Everything works ok untill I wanted to put a doctype at my html.

I've tried the transitional and strict, both made my div disappear.

So I've inserted the HTML5 type of doctype and my div appeared ok.

Well, I want to make my website with html4.

Is it possible?

like image 879
Marcelo Noronha Avatar asked Dec 05 '11 19:12

Marcelo Noronha


People also ask

Which is the correct doctype?

Correct Option: Ddoctype html>, doctype is the very first thing to write in HTML5.

What is the most common doctype used with HTML email?

The most popular DOCTYPE nowadays is the HTML 5 doctype ( <! DOCTYPE HTML> ) which is used with very little hiccups. The most popular/safest doctype used to be the <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> doctype.

Which doctype is used for HTML5?

doctype html> or <! This is because, html5 is a SGML based, unlike HTML4. 01 or XHTML1. As soon a browser finds <! doctype html> in the starting of an HTML document, it represents the document in standard mode.

Should I add doctype HTML?

Yes you should put the doctype in every file. If you don't put a doctype on a document, browsers will go into quirks mode when rendering that document. And you (and your users) don't want browsers to use quirks mode to render your documents.


1 Answers

Everything I've read lately seems to say that you should just use a plain doctype so the browsers can use the latest rendering standards.

<!DOCTYPE HTML >
like image 154
ShaneBlake Avatar answered Sep 20 '22 10:09

ShaneBlake