16/361

Can you give an example of an @media property other than screen?

Quiz · CSS
Medium
3 min
css

Yes, there are four types of @media properties (including screen):

  • all - for all media type devices
  • print - for printers
  • speech - for screenreaders that "read" the page out loud
  • screen - for computer screens, tablets, smart-phones etc.

Here is an example of print media type's usage:

@media print {
  body {
    color: black;
  }
}

Adapted from the Front End Interview Handbook by Yangshun Tay and contributors (MIT License). Source

Spotted a mistake or a rights concern? Report an issue