ComputersProgramming

HTML-page - print version

There is a huge amount of information on the Internet. Here you can find almost everything, from the description of the field flower and ending with the construction of combat machines. And, of course, some users want to print directly from the browser print the page of interest to them. Modern software can meet this need. But here one problem is hidden, because the developers made their pages specifically for playback in the browser, and on paper their documents can look quite different. Especially for such cases, a version for printing was developed, in which new values are assigned for all pages of the site.

Typically, printed versions of documents on the Internet are used for a certain type of information - for example, if your site hosts many abstracts or any teaching aids. Most often, documents with forms, stories, recipes, texts and similar information are printed. The print version is rarely found in interactive sites. If you have an assumption that users who come to your portal will want to copy information to paper, then you should take care of the special design.

In the html version for printing differs from simple pages by simplified design. Now any modern browser can reproduce almost any idea, stated by the developer in the programming language. It's completely different with printers. Not every Internet user has a digital and color device at home. Therefore, when printing, some fragments of the web page will be displayed with changes. The page sizes are even more problematic, especially when absolute values are used. The print version includes limiting the use of unnecessary and unnecessary graphic effects. After all, the user, first of all, needs to get the information part of the page, and the decorative model of the site can be and remains in electronic form.

In order for the browser to understand what version of the site to use for printing, you need to use the keyword "@media". Attention, this is not an HTML-value, but a CSS-property, where you will find the design of your documents, which are ready for printing on paper. You need to write the keyword "@media print" (where the latter determines the type of media) using any method convenient for you. After that, the usual CSS-code goes. For example: "@media print p {color: black; Font-family: Times; } ». So the browser will understand that when printing it will only use black ink and Times font, which has special serifs. You can specify any values. The print version of html-files can have additional attributes. There is an opportunity to control the size of the page, its orientation on paper, make additional marks, etc. Enumerate them all does not make sense, since they are described in detail in specialized directories.

The print version is widely used on many sites. In this case, there is no need to redo the entire portal, so that your documents look equally good on paper and in browsers. CSS developers very competently provided this situation in accordance with the needs of users.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.