Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does media="screen" mean in css?

Tags:

css

media

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

<style type="text/css" media="screen">
like image 451
dramasea Avatar asked Dec 24 '10 02:12

dramasea


People also ask

What is screen in media CSS?

screen: It is used to set the screen size of media query. The screen size can be set by using max-width and min-width. The screen size is differ from screen to screen. Example: This example use media query which works when the maximum width of display area is 400px.

What does media screen do in HTML?

Media queries can be used to check many things, such as: width and height of the viewport. width and height of the device. orientation (is the tablet/phone in landscape or portrait mode?)

What is media type in CSS?

CSS 2.1 defines the following media groups: continuous or paged. visual, audio, speech, or tactile. grid (for character grid devices), or bitmap. interactive (for devices that allow user interaction), or static (for those that do not).

What screen means in media query?

What is the media-screen query? The @media screen query simply means that the query in question is intended for the color screens or devices that support a “screen” mode. Let's take an example: @media screen and (max-width:500px) The above query applies to screens with a maximum width of 500 pixels.


1 Answers

The goal of the media attribute is to allow you to specify different styles for different methods of display.

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

Normally on the "print" css I'll do things like hide buttons, strip out extraneous images, ads, etc etc. Basically, make it 8.5x11 friendly.

like image 137
Brook Avatar answered Sep 25 '22 03:09

Brook