Web Quality - Stylesheets
- Previous Page HTML Elements
- Next Page Readability
Using style sheets is crucial for improving the quality of web pages.
Do not use the font tag
CSS should be used to set the font size displayed on web pages. Do not use the font tag.
Using the <font> tag increases the size of the document and makes it a nightmare to change standard text sizes every time.
Imagine the following situation:
One day you decide to change the color and size of all titles on your website. With CSS, you can do this with just one line of code. If you use the <font> tag, you would need to change all titles on every page of the website.
Using styles instead of the <font> tag makes it easier for us 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 suggestion is that the fixed size cannot be adjusted through the browser.
Your visitors will use different devices (displays), different browsing environments (light), and possible disabilities (weak 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 titles to 120% (or large), so that users can use the browser to reset their favorite size.
The function of adjusting the text size of web pages can also change the number of words on the printed page.
Do not use very small default font sizes
Some websites use very small text sizes to fit more content on each page or to make the page look more 'trendy'.
Reiterate again, different devices (displays), different browsing environments (light), and possible disabilities (weak vision) may cause reading difficulties for users.
Please do not force users to resize the text size every time they visit your site.
Always use consistent background colors
Most web pages use colors for different text elements. The colors of titles and links are usually different from the text color of the body.
As a web designer, you should be aware that your visitors can modify the default color options.
If you define colors for web elements, you should also define background colors.
If you do not define a background color, your website may be ruined by poor color combinations (such as bright red text on a red background, or dark text with a dark background).
If you do not specify a background color, it may make the text difficult to recognize.
- Previous Page HTML Elements
- Next Page Readability