HTML Element Default CSS Values

Web browsers apply user-agent stylesheets that provide default CSS values for many HTML elements before author styles are applied.

The following reference lists the normal default CSS declarations associated with current HTML elements. These defaults help explain why headings are bold, paragraphs have margins, lists have indentation, tables use table-specific display values, and many semantic elements display as blocks without any CSS supplied by the author.

Understanding Default CSS Values

The values in this reference represent default user-agent styling associated with HTML elements. They provide a useful baseline for understanding how elements normally appear before a website's own stylesheet changes their presentation.

Browser stylesheets are not identical in every browser. Some controls and replaced elements also depend on browser-native rendering rather than a simple set of CSS declarations. Conditional rules, attribute-dependent styles, pseudo-elements, presentational hints, quirks-mode rules, and browser-specific rules may also affect an element.

Element Default CSS Values

Element Default CSS Values Notes
<a>
color: -webkit-link;
text-decoration: underline;
cursor: auto;
Typical UA styling for links; state-dependent.
<abbr> none
<address>
display: block;
font-style: italic;
<area> none
<article>
display: block;
<aside>
display: block;
<audio> none Rendered as a replaced/media element; controls are UA-defined when present.
<b>
font-weight: bolder;
<base>
display: none;
<bdi>
unicode-bidi: isolate;
<bdo>
unicode-bidi: isolate-override;
<blockquote>
display: block;
margin-block: 1em;
margin-inline: 40px;
<body>
display: block;
margin: 8px;
<br> none Creates a line break by HTML rendering behavior.
<button>
display: inline-block;
appearance: auto;
box-sizing: border-box;
text-align: center;
text-transform: initial;
text-indent: initial;
text-shadow: initial;
letter-spacing: initial;
word-spacing: initial;
line-height: initial;
<canvas> none Replaced element; default intrinsic size 300px × 150px is HTML behavior, not a CSS declaration.
<caption>
display: table-caption;
text-align: center;
<cite>
font-style: italic;
<code>
font-family: monospace;
<col>
display: table-column;
<colgroup>
display: table-column-group;
<data> none
<datalist>
display: none;
<dd>
display: block;
margin-inline-start: 40px;
<del>
text-decoration: line-through;
<details>
display: block;
<dfn>
font-style: italic;
<dialog>
display: block;
position: absolute;
inset-inline: 0;
width: fit-content;
height: fit-content;
margin: auto;
border: solid;
padding: 1em;
background-color: Canvas;
color: CanvasText;
display: none;
When not open.
<div>
display: block;
<dl>
display: block;
margin-block: 1em;
<dt>
display: block;
<em>
font-style: italic;
<embed> none Replaced element.
<fieldset>
display: block;
margin-inline: 2px;
border: groove 2px ThreeDFace;
padding-block: 0.35em 0.625em;
padding-inline: 0.75em;
min-inline-size: min-content;
<figcaption>
display: block;
<figure>
display: block;
margin-block: 1em;
margin-inline: 40px;
<footer>
display: block;
<form>
display: block;
<h1>
display: block;
font-weight: bold;
margin-block: 0.67em;
font-size: 2em;
<h2>
display: block;
font-weight: bold;
margin-block: 0.83em;
font-size: 1.5em;
<h3>
display: block;
font-weight: bold;
margin-block: 1em;
font-size: 1.17em;
<h4>
display: block;
font-weight: bold;
margin-block: 1.33em;
font-size: 1em;
<h5>
display: block;
font-weight: bold;
margin-block: 1.67em;
font-size: 0.83em;
<h6>
display: block;
font-weight: bold;
margin-block: 2.33em;
font-size: 0.67em;
<head>
display: none;
<header>
display: block;
<hgroup>
display: block;
<hr>
display: block;
color: gray;
border-style: inset;
border-width: 1px;
margin-block: 0.5em;
margin-inline: auto;
overflow: hidden;
<html>
display: block;
<i>
font-style: italic;
<iframe> none Replaced element; border styling is UA/browser-dependent.
<img> none Replaced element.
<input>
display: inline-block;
appearance: auto;
text-align: initial;
text-transform: initial;
text-indent: initial;
text-shadow: initial;
letter-spacing: initial;
word-spacing: initial;
line-height: initial;
Additional defaults depend on input type.
<ins>
text-decoration: underline;
<kbd>
font-family: monospace;
<label> none
<legend>
display: block;
padding-inline: 2px;
<li>
display: list-item;
text-align: match-parent;
<link>
display: none;
<main>
display: block;
<map> none
<mark>
background: yellow;
color: black;
<math> none MathML rendering rules apply.
<menu>
display: block;
margin-block: 1em;
padding-inline-start: 40px;
counter-reset: list-item;
<meta>
display: none;
<meter>
appearance: auto;
<nav>
display: block;
<noscript> none
<object> none Replaced element.
<ol>
display: block;
margin-block: 1em;
padding-inline-start: 40px;
counter-reset: list-item;
list-style-type: decimal;
<optgroup>
display: block;
font-weight: bolder;
<option>
display: block;
<output> none
<p>
display: block;
margin-block: 1em;
<picture> none
<pre>
display: block;
margin-block: 1em;
font-family: monospace;
white-space: pre;
<progress>
appearance: auto;
<q> none Quotation marks are generated by HTML rendering behavior.
<rp> none
<rt>
display: ruby-text;
<ruby>
display: ruby;
<s>
text-decoration: line-through;
<samp>
font-family: monospace;
<script>
display: none;
<search>
display: block;
<section>
display: block;
<select>
appearance: auto;
text-align: initial;
text-transform: initial;
text-indent: initial;
text-shadow: initial;
box-sizing: border-box;
Display depends on drop-down/list-box appearance.
<selectedcontent> none
<slot>
display: contents;
<small>
font-size: smaller;
<source>
display: none;
<span> none
<strong>
font-weight: bolder;
<style>
display: none;
<sub>
vertical-align: sub;
line-height: normal;
font-size: smaller;
<summary>
display: list-item;
list-style: disclosure-closed inside;
Applies to the first <summary> in a <details> element. The marker changes to the open disclosure state when <details> is open.
<sup>
vertical-align: super;
line-height: normal;
font-size: smaller;
<svg> none SVG rendering rules apply.
<table>
display: table;
border-collapse: separate;
border-spacing: 2px;
border-color: gray;
<tbody>
display: table-row-group;
vertical-align: middle;
border-color: inherit;
<td>
display: table-cell;
vertical-align: inherit;
<template>
display: none;
<textarea>
appearance: auto;
text-align: initial;
text-transform: initial;
text-indent: initial;
text-shadow: initial;
letter-spacing: initial;
word-spacing: initial;
line-height: initial;
white-space: pre-wrap;
<tfoot>
display: table-footer-group;
vertical-align: middle;
border-color: inherit;
<th>
display: table-cell;
vertical-align: inherit;
font-weight: bold;
text-align: center;
<thead>
display: table-header-group;
vertical-align: middle;
border-color: inherit;
<time> none
<title>
display: none;
<tr>
display: table-row;
vertical-align: inherit;
border-color: inherit;
<track>
display: none;
<u>
text-decoration: underline;
<ul>
display: block;
margin-block: 1em;
padding-inline-start: 40px;
counter-reset: list-item;
list-style-type: disc;
<var>
font-style: italic;
<video> none Replaced/media element; controls are UA-defined when present.
<wbr> none Line-break opportunity is HTML rendering behavior.

What "None" Means

In this reference, none means that no element-specific default CSS declaration is listed for the element. It does not mean that the element has no presentation or rendering behavior.

An element can still inherit CSS properties, use CSS initial values, have intrinsic or replaced-element behavior, or receive browser-specific native styling. Some elements also have rendering behavior defined by HTML, SVG, MathML, or other specifications rather than by an element-specific CSS declaration.