+7 css media...">

What does media = "screen" mean in css?

What does media = "screen" mean in css code below?

<style type="text/css" media="screen"> 
+7
source share
3 answers

The purpose of the media attribute is to give you the ability to specify different styles for different display methods.

I usually use this to have 2 sets of styles, 1 for display (screen) and 1 for print (print)

Usually on "print" css I will do things like hide buttons, cross out extraneous images, ads, etc. Basically, make it 8.5x11 friendly.

+8
source

There are two types: screen - this is the default browser. Printing is for printing. A.

+4
source

In addition to Brooke's answer, the media="foo" attribute is equivalent to @media foo in your CSS file

+1
source

All Articles