<!DOCTYPE html> <html> <head> <style type="text/css" media="print"> .design{ background-color: lightblue; color:white; width:100%; float:left; height:500px; } </style> <style type="text/css" media="screen"> .design{ background-color: lightgreen; color:white; width:50%; float:left; height:700px; } </style> </head> <body> <div class="design">Two style elements are used. One is for print media and the other one is for print media. Here second stylesheet is used because it is print media.</div> </body> </html>
Run
×
Share