CSS Reference
CSS Reference
CSS reference
Jump to section
Use this CSS reference to browse an alphabetical index of all of the standard CSS properties,
pseudo-classes, pseudo-elements, data types, and at-rules. You can also browse key CSS
concepts and a list of selectors organized by type. Also included is a brief DOM-CSS / CSSOM
reference.
style-rule ::=
selectors-list {
properties-list
}
... where :
selectors-list ::=
selector[:pseudo-class] [::pseudo-element]
[, selectors-list]
properties-list ::=
[property : value] [; properties-list]
See the index of selectors, pseudo-classes, and pseudo-elements below. The syntax for each
specified value depends on the data type defined for each specified property.
1 strong {
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
2 color: red;
3 }
4
5 div.menu-bar li:hover > ul {
6 display: block;
7 }
For a beginner-level introduction to the syntax of selectors, see our guide on CSS Selectors. Be
aware that any syntax error in a rule definition invalidates the entire rule. Invalid rules are
ignored by the browser. Note that CSS rule definitions are entirely (ASCII) text-based, whereas
DOM-CSS / CSSOM (the rule management system) is object-based.
At-rule syntax
As the structure of at-rules varies widely, please see At-rule to find the syntax of the specific
one you want.
Keyword index
Note: The property names in this index do not include the JavaScript names where they
di er from the CSS standard names.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
-webkit-line-clamp
- A
:active annotation() block-size
align-content B border-block
border-inline-color border-spacing
border-inline-end border-start-end-radius C
border-inline-end-color border-start-start-radius calc()
border-inline-start border-top-color ch
h t i t()
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
character-variant()
border-inline-start-style border-top-right-radius
@charset
:checked conic-gradient() :dir
cm counter-reset <display-internal>
column-rule-color cursor
column-rule-style <custom-ident> E
element()
column-rule-width
column-span D ellipse()
column-width :default em
d t
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
columns deg :empty
<dimension> empty-cells
:enabled flex-wrap font-synthesis
font font-variant-alternates
F @font-face font-variant-caps
fallback (@counter-style)
font-family font-variant-east-asian
filter font-family (@font-face) font-variant-ligatures
<filter-function>
font-feature-settings font-variant-numeric
:first font-feature-settings (@font- font-variant-position
:first-child face) font-variation-settings
::first-letter (:first-letter) @font-feature-values font-variation-settings (@font-
::first-line (:first-line) font-kerning face)
:first-of-type font-language-override font-weight
fit-content() font-optical-sizing font-weight (@font-face)
<flex> font-size format()
flex font-size-adjust fr
flex-basis font-stretch <frequency>
flex-direction font-stretch (@font-face) <frequency-percentage>
flex-flow font-style :fullscreen
fl
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
flex-grow font-style (@font-face)
flex-shrink G
gap in
H
grad Hz :in-range
grid-column-start inset-inline
grid-row I inset-inline-end
grid-template-rows image-set()
Create PDF in your applications with the Pdfcrowd HTML to PDF API
J PDFCROWD
@import J
justify-content
justify-items :link mask
list-style-image mask-border-mode
K list-style-position mask-border-outset
kHz list-style-type mask-border-repeat
@keyframes
local() mask-border-slice
mask-border-source
L M mask-border-width
:lang margin mask-clip
:last-child margin-block mask-composite
:last-of-type
margin-block-end mask-image
leader() margin-block-start mask-mode
:left margin-bottom mask-origin
left margin-inline mask-position
@left-bottom
margin-inline-end mask-repeat
<length> margin-inline-start mask-size
<length-percentage> margin-left mask-type
letter-spacing margin-right matrix()
line-break margin-top
matrix3d()
line-height k
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
line height ::marker max()
linear-gradient() marks (@page)
max-block-size opacity
N
max-height @namespace opacity()
min-block-size outline
min-height O outline-color
mm :only-child overflow-wrap
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
ms :only-of-type overflow-x
overflow-y page-break-after pt
overscroll-behavior page-break-before px
overscroll-behavior-block page-break-inside
overscroll-behavior-inline paint() Q
Q
overscroll-behavior-x paint-order
pc
P R
<percentage>
pad (@counter-style) rad
perspective
radial-gradient()
padding perspective()
padding-block range (@counter-style)
perspective-origin
padding-block-end <ratio>
place-content
padding-block-start :read-only
place-items
:read-write
padding-bottom place-self
padding-inline rect()
::placeholder
padding-inline-end rem
pointer-events
padding-inline-start repeat()
polygon()
padding-left repeating-linear-gradient()
<position>
padding-right repeating-radial-gradient()
position
ddi t :required
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
padding-top :required
prefix (@counter-style)
@page resize
scroll-margin-right sepia()
S scroll-margin-top <shape>
s scroll-padding shape-image-threshold
saturate() scroll-padding-block shape-margin
l
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
scale scroll-padding-block-end shape-outside
scale()
size (@page) text-indent
T
skew() tab-size text-justify
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
system (@counter-style) text-emphasis-style transform-style
transition-duration will-change
transition-property V word-break
translateX() @viewport X
translateY() viewport-fit (@viewport) x
translateZ() visibility
:visited Z
turn
vmax z-index
zoom (@viewport)
U vmin
unicode-bidi vw
Others
unicode-range (@font-face)
--*
unset W
<url> white-space
widows
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Selectors
The following are the various selectors, which allow styles to be conditional based on various
features of elements within the DOM.
Basic selectors
Basic selectors are fundamental selectors; these are the most basic selectors that are
frequently combined to create other, more complex selectors.
ID selector #idname
Grouping selectors
Selector list A, B
Specifies that both A and B elements are selected. This is a grouping method to select
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
several matching elements.
Combinators
Combinators are selectors that establish a relationship between two or more simple selectors,
such as " A is a child of B " or " A is adjacent to B ."
Descendant combinator A B
Specifies that the element selected by B is a descendant of the element selected by A , but
is not necessarily a direct child.
Column combinator A || B
Specifies that the element selected by B is located within the table column specified by A .
Elements which span multiple columns are considered to be a member of all of those
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Elements which span multiple columns are considered to be a member of all of those
columns.
Pseudo
Pseudo classes :
Specifies a special state of the selected element(s).
Pseudo elements ::
Represents entities that are not included in HTML.
Concepts
Syntax and semantics
CSS syntax
At-rules
Cascade
Comments
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Descriptor
Inheritance
Shorthand properties
Specificity
Value definition syntax
CSS unit and value types
Values
Actual value
Computed value
Initial value
Resolved value
Specified value
Used value
Layout
Block formatting context
Box model
Containing block
Layout mode
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Margin collapsing
Replaced elements
Stacking context
Visual formatting model
DOM-CSS / CSSOM
Major object types
DocumentOrShadowRoot.styleSheets
styleSheets[i].cssRules
cssRules[i].selectorText
HTMLElement.style
Element.className
Element.classList
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Important methods
CSSStyleSheet.insertRule()
CSSStyleSheet.deleteRule()
See also
Mozilla CSS extensions (prefixed with -moz- )
Related Topics
CSS
CSS Reference
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Learn the best of web development
Get the latest and greatest from MDN delivered straight to your inbox.
Sign up now
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD
Feedback Firefox
MDN Mozilla
© 2005-2020 Mozilla and individual contributors. Content is available under these licenses.
Create PDF in your applications with the Pdfcrowd HTML to PDF API PDFCROWD