The @media rule

An @media rule specifies the target media types (separated by commas) of a set of statements (delimited by curly braces). The @media construct allows style sheet rules for various media in the same style sheet as shown in the example

@media print {
body { font-size: 10pt }
}
@media screen {
body { font-size: 13px }
}
@media screen, print {
body { line-height: 1.2 }
}

Style rules outside of @media rules apply to all media types that the style sheet applies to.

Go To- Certified CSS3 Developer Tutorial
Applying Styles Based On Media
Page Breaks

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?