Website quality...login
Website quality tutorial
author:php.cn  update time:2022-04-01 15:28:35

Web quality stylesheet



Using style sheets is crucial to improving the quality of web pages.


Don’t use the <font> tag!

CSS should be used to set the font size on the displayed web page. Please do not use the font tag.

Using the <font> tag increases the size of the document and makes changing the standard text size a nightmare every time you do it.

Please imagine the following situation:

One day you decide to change the color and size of all the headings on your website. With CSS, you can do this by modifying just one line. If you use the <font> tag, you will need to change all titles on all pages on your website.

lamp.gifUsing styles instead of the <font> tag makes it easier to create high-quality interfaces for web pages.


Do not use fixed font sizes

Do not use fixed size values. Always use relative size values.

The most important reason for this recommendation is that fixed dimensions cannot be resized via the browser.

Your visitors will use different devices (monitors), different browsing environments (light), and possible disabilities (low vision).

For example, you can set someone's text size to 100% (or medium), the main title to 140% (or x-large), and the secondary title to 120% (or large) , so the user can use the browser to reset to their preferred size.

Note: By adjusting the text size of the web page, you can also change the number of text on the printed page.


Do not use very small default font sizes

Some websites use very small text sizes so that they can "cram" more content into each page. Or make the page look more "fashionable".

Again, the use of different devices (monitors), different browsing environments (light), and possible disabilities (low vision) may cause reading difficulties for users.

lamp.gif Please don’t force users to increase the text size every time they visit your site.


Always use a consistent background color

Most web pages use colors for different text elements. The color of headings and links is usually different from the main text color.

As a web designer, you should be aware of the fact that your visitors can modify the default color options.

If you define a color for a web element, you should also define a background color.

If you don't define a background color, your site could be messed up by bad color combinations (like bright red text on a red background, or dark text on a dark background).

lamp.gif If you do not specify a background color, it may make the text difficult to read.

php.cn