paperlined.org
dev > web > formats > css
document updated 1 year, 2 months ago, on Jan 31, 2023

HTML CSS equivalency

CSS equivalent undo
<b> font-weight: bold; font-weight: normal;
<i>
<em>
font-style: italic; font-style: normal;
<u> text-decoration: underline; text-decoration: none;
<s> text-decoration: line-through; text-decoration: none;
<blink> text-decoration: blink; text-decoration: none;
<tt> font-family: monospace; font-family: serif;
<pre> white-space: pre;
font-family: monospace;
white-space: normal;
font-family: serif;
<center> margin: 0 auto;
(NOTE: document must have a valid DOCTYPE, otherwise it won't work in IE)
margin: 0 0;
<del> text-decoration: line-through; text-decoration: none;
<q> q::before, q::after {content:'"'} q::before, q::after {content:''; content:none}
 
<sup> vertical-align: super;
font-size: 75%; (closish?)
<sub> vertical-align: sub;
font-size: 75%; (closish?)
 
<div>
<p>
display: block;
<span> display: inline;
<table> display: table;
<td>
<th>
display: table-cell;

Browser defaults

Some browsers expose their default .css rules, which is more or less the above list.

Firefox: layout/style/html.css (and quirk.css)

Safari:
file:///System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Resources/html4.css
file:///System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Resources/quirks.css

Unified "base"/"reset" .css

Some people have put together a single stylesheet that tries to make all the browsers work as closely as possible 1) to each other, and sometimes 2) to the standard. In the case of #2, they're useful for the above.