Saturday, May 24, 2014

Doctypes border-spacing and class-names

I wanted to be able to use a CSS class-name beginning with a number for my Table cross-correlation page. I discovered that class-names beginning with numbers are able to do everything normal class-names can do with table CSS, except for border-spacing, and that this holds true regardless of the Doctype. In the process produced a table that could be useful regardless of whether you want to use numerical class-names or not:

Doctype, Border-spacing, tables colors, class-names in IE8

Seems (re IE8) that the best Doctype to use if you want to be able to present both table-colors and also border-spacing, would be "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//EN">". I dreamed this Doctype up myself, cobbling together various elements from different Doctypes. This Doctype: references HTML 5, allows for full table-color presentation and control, allows for border-spacing. By way of contrast,  <!DOCTYPE html 5>  does not allow for border-spacing.

I'll have to check to see if this <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//EN">" actually does support HTML 5. When no Doctype is listed and when the only doctype declaration is '<!Doctype>', table-colors are supported but border-spacing is not. Best I can tell, if the Doctype listed is unrecognized by the browser, the browser behaves as it would if no Doctype was included in the html file.    

Labels: , , , , , , , ,

0 Comments:

Post a Comment

<< Home

SM
GA
SC