Markup Language - Print Style Sheets

Markup Language - Print Style Sheets
Click here to return to the 123WORDPRESS.COM HTML Tutorial section. To view the CSS tutorial, please click here.
Previous: Markup language - applying CSS styles to web pages . Chapter 11 Print Styles Previously in Chapter 10, we discussed several ways to apply CSS to your documents. In this chapter, we'll look at print styles, specifying CSS rules specifically for printed pages. With just a few CSS rules, you can ensure that your structured markup looks just as good on paper as it does on the screen.
First, let's look at media types and how they relate to providing device-specific CSS. How do you specify styles for print?
Before answering this question, we must be familiar with a concept, that is, we can specify the media type for CSS, and declaring the media type will enable the style to work for specific media.
For example, if you want to style a link specifically for computer screens, you can add the media attribute to the <link> tag like this:

<link rel="stylesheet" type="text/css" media="screen" href="screenstyles.css" />

: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : :
This chapter will focus on the all, print, and screen media types.
Previous Page 1 2 3 4 5 Next Page Read More

<<:  Detailed explanation of the processing of the three Docker Nginx Logs

>>:  In-depth explanation of InnoDB locks in MySQL technology

Recommend

IE8 Beta 1 has two areas that require your attention

<br />Related articles: Web skills: Multiple...

How to write high-quality JavaScript code

Table of contents 1. Easy to read code 1. Unified...

One-click installation of MySQL 5.7 and password policy modification method

1. One-click installation of Mysql script [root@u...

Analyzing the MySql CURRENT_TIMESTAMP function by example

When creating a time field DEFAULT CURRENT_TIMEST...

Vue element implements table adding, deleting and modifying data

This article shares the specific code of vue elem...

HTML left and right layout example code

CSS: Copy code The code is as follows: html,body{ ...

Implementation of MySQL scheduled backup script under Windows

On a Windows server, if you want to back up datab...

Notes on upgrading to mysql-connector-java8.0.27

Recently, an online security scan found a vulnera...

Example of configuring multiple SSL certificates for a single Nginx IP address

By default, Nginx supports only one SSL certifica...

How to install PHP7 Redis extension on CentOS7

Introduction In the previous article, we installe...

How to implement scheduled automatic backup of MySQL under CentOS7

The happiest thing that happens in a production e...