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

Detailed explanation of Apache website service configuration based on Linux

As an open source software, Apache is one of the ...

Detailed code for implementing 3D tag cloud in Vue

Preview: Code: Page Sections: <template> &l...

React+TypeScript project construction case explanation

React project building can be very simple, but if...

Detailed explanation of js closure and garbage collection mechanism examples

Table of contents Preface text 1. Closure 1.1 Wha...

How to install Docker on Windows 10 Home Edition

I recently used Docker to upgrade a project. I ha...

Vue implements the full selection function

This article example shares the specific code of ...

JavaScript to achieve product magnifying glass effect

This article shares the specific code of JavaScri...

Master-slave synchronization configuration of Mysql database

Table of contents Mysql master-slave synchronizat...

Analyze Mysql transactions and data consistency processing issues

This article analyzes the consistency processing ...

Ubuntu 18.04 disable/enable touchpad via command

In Ubuntu, you often encounter the situation wher...

Example code of vue + element ui to realize player function

The display without the effect picture is just em...

How to install ionCube extension using pagoda

1. First install the pagoda Installation requirem...