Tag Archive for 'web standards'

CSS 2 selectors

Learning how to use the full range of CSS selectors available in CSS 2.1 properly can actually help you keep your HTML a lot cleaner. It will let you minimise unnecessary use of the class attribute and the need for adding extraneous div and span elements to the markup. Sounds good, right?

I’m going to describe all the selectors later on, so things will definitely get a bit trickier. Before that though, here is an overview of the syntax for all CSS 2.1 selectors.

Continue reading ‘CSS 2 selectors’

How to size text with CSS

Example 1: Text size in pixels

The default text size is a good starting point, but for most people (designers, clients, and their customers) 16px is too large for body text. In our example, the body text was reduced to 12px (pixels).

  1. .text p { font-size:14px; }

The result show that Safari and Firefox still resize the text, but IE6 and IE7 do not. In Opera and IE7 the text can be resized by using the page zoom tool, which magnifies the page layout, text and images within.

Example 2: Text size in ems

In this example we will use ems to size the text. The em is a true typographic unit, recommended by the W3C, and affords a precision keywords lack. Working from a default of 16px, the following styles should give the desired text sizes:

Continue reading ‘How to size text with CSS’

What are web standards?

The World Wide Web Consortium (W3C), along with other groups and standards bodies, has established technologies for creating and interpreting web-based content. These technologies, which we call ‘web standards‘, are carefully designed to deliver the greatest benefits to the greatest number of web users while ensuring the long-term viability of any document published on the Web.

Designing and building with these standards simplifies and lowers the cost of production, while delivering sites that are accessible to more people and more types of Internet devices. Sites developed along these lines will continue to function correctly as traditional desktop browsers evolve, and as new Internet devices come to market.

Continue reading ‘What are web standards?’