Welcome to the CSS Tutorials. In this section we cover Cascading Style Sheets, the powerful supplement to HTML that allows you complete control over the look of your websites. We'll show you how to create Cascading Style Sheets, and some of the cool tricks you can achieve with them.
Introduction to CSS
For Intermediate Users...
Controlling Background Images and Colours
Controlling Fonts with CSS
Controlling Text Appearance with CSS
Making Lists Look Nicer with CSS
For Advanced Users...
The STYLE element, which is a relatively new element in HTML, is the most common way to define a style sheet, since it appears in the document itself. STYLE should always use the attribute TYPE; in the case of a CSS1 document, the correct value is text/css, just as it was with the LINK tag. So, the STYLE or otherwise.
The fictional LINE element actually clarifies thebehavior that results from setting line-height ona block-level element. According to theCSS specification, declaringline-height on a block-level element sets aminimum line-box height for the content of thatblock-level element. Thus, declaring P.spacious different sizes. That's true, but the reason that small-caps is declared using a font property is that some fonts have a specific small-caps face. Thus, a font property is used to select that face.
What happens if no such face exists? There are two options provided in the specification. The first is for the user agent to create a small-caps face by scaling uppercase letters on its own. The second is simply to make all letters uppercase and the same size, exactly as if the declaration text-transform: