W3Schools.com

Web Quality - Style Sheets


Using Style Sheets is important to increase the web page quality.


Don't use the <font> tag!

The size, font, and color of text should be set with CSS (Cascading Style Sheets).

Do not use the HTML <font> tag!

Using the <font> tag will increase the size of your document, and give you a nightmare every time you want to change your standard text size.

Think of the following example:

One day you decide to change all the headings in your web to another color and another size. With CSS you can change the color and size attributes by rewriting one line of code. If you have used the <font> tag, you will have to edit the <font> tag for all the headings in all your web pages.

lamp.gif Using CSS instead of <font> makes it much easier to give all the pages of your web site a high quality and consistent look.


Don't use fixed sizes

Never use fixed size values. Always use relative size values.

The most important reason for this advice is that fixed sizes can not be resized by the browser.

Your visitors will have different monitors, different viewing conditions (light), and possible disabilities (poor eyesight).

Setting your default text size to 100% (or medium), your main headers to 140% (or x-large), your sub headers to 120% (or large), as an example, will make it possible for your reader to resize your pages to their best fit.

Want to see how it works? Select view in your browsers menu, and change the text size for this page.

Note: Adjusting the text size of a web page also changes the amount of text that will fit on a printed page.


Don't use a small font size

Some web sites use a small text size just to "squeeze" more text into each page, or to make the page more "stylish".

Again, visitors with different equipment, viewing conditions, and disabilities might have difficulties reading the text.

lamp.gif Don't force your visitors to enlarge the text size every time they visit your site.


Always use a background color

Most web pages use colors for different text elements. Both headers and links are often in a different color from the body text.

As a web designer, you should be aware of the fact that your visitors are able to change their default color preferences.

If you define colors for your web elements (like header and links), you should also define the background color.

If you don't define a background color, your web site might end up with some very bad combination of colors (like light red headers on a red background, or even worse, black text on a black background)

lamp.gif If you don't specify a background color, your text might be invisible.




W3Schools Certification

W3Schools' Online Certification

The perfect solution for professionals who need to balance work, family, and career building.

More than 10 000 certificates already issued!

Get Your Certificate »

The HTML Certificate documents your knowledge of HTML.

The CSS Certificate documents your knowledge of advanced CSS.

The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.

The jQuery Certificate documents your knowledge of jQuery.

The XML Certificate documents your knowledge of XML, XML DOM and XSLT.

The ASP Certificate documents your knowledge of ASP, SQL, and ADO.

The PHP Certificate documents your knowledge of PHP and SQL (MySQL).

WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$7.95/mo SEO Hosting
Premium Website Design
WEB BUILDING
Download XML Editor
FREE Website BUILDER
Free Website Templates Free CSS Templates
Make Your Own Website
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE