Variable Visions

Articles HTML No-DOCTYPE-tag-will-force-quirks-mode-and-limit-some-CSS-rules-from-applying

tutorials - HTML and Web-Development.

No DOCTYPE tag will force quirks mode and limit some CSS rules from applying

Published Thu. Nov. 08, 2012

You would think all sites would use the standard DOCTYPE tag

While comparing a few pages in a new web site project, I noticed some pages don't use the DOCTYPE tag. It took me a while, but I realized that without the DOCTYPE tag, certain CSS rules will not work.

margin: 0 auto;

any :hover or other pseudo classes


This may come up if you testing some CSS and your rules don't work...make sure there is a DOCTYPE tag on the html page at the very top:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">




PUBLISHED ON 03.3.20arrowWordpress and Woocommerce widget for inserting PHP in Elementor

PUBLISHED ON 09.5.19arrowWordpress and Woocommerce redirect to a product page from categories with a single product