Tuesday 07th of February 2012 05:24:25 AM

CSS Style Guide

XHTML Guidelines & Benefits

XHTML is the standard markup language for web documents and the successor to HTML 4. Library projects must be authored in structural XHTML 1.0 Transitional.

The following topics provide all the information you need to create well-formed XHTML pages that validate and are accessible, and/or to convert old HTML pages to valid, well-formed, accessible XHTML:

XHTML Guidelines
The rules of XHTML as compared to HTML — an easy transition
What is XML?
A brief introduction to the foundation of XHTML
XHTML Benefits
The benefits of converting from HTML to XHTML
XHTML Authoring Tips 'n Tools
Simplifying the work process—includes tips on using Dreamweaver
XHTML Accessibility Tips
Making sure your pages can be read

This property has the advantage of being very compact, although thatbrevity introduces a few limitations. Before we worry about that,let's see how border is used. If you wantall H1 elements to have a thick, silver border,it's very simple. This declaration would be displayed as shownin Figure 7-49:

H1 {border: thick silver solid;}

The drawback with border is that you can only

XHTML Validation
Keeping your markup kosher

By defining a set of programming language independent interfaces that allow the accessing and mutation of XML documents, the W3C made it easier for programmers to deal with XML. Not only does XML address the need for a standard information encoding and storage format, it also allows programmers a standard way to use that information. SAX is a very low level API, but it is more than what has been available before it. DOM is a higher level API that even provides a default object model for all XML documents (saving time in creating one from scratch if you are using data is document data).

SAX, DOM and XML are very developer friendly because developers are going to decide whether this technology will be adopted by the majority and become a successful effort towards the goal of interoperable, platform, and device independent computing.

XML is web enabled

XML is derived from SGML, and so was HTML. So in essence, the current infrastructure available today to deal with HTML content can be re-used to work with XML. This is a very big advantage towards delivering XML content using the software and networking infrastructure already in place today. This should be a big plus in considering XML for use in any of your projects, because XML naturally lends itself to being used over the web.

Even if clients don't support XML natively, it is not a big hindrance. In fact, Java with Servlets (on the server side) can convert XML with stylesheets to generate plain HTML that can be displayed in all web browsers.

accepts as a value any valid color, as discussed in Chapter 3, "Units and Values", such as #FFCC00 or rgb(100%,80%,0%). It has the effect of setting the color of the text in the element, as shown in Figure 6-1:

<P STYLE="color: gray;">This paragraph has a gray foreground.</P>
<P>This paragraph has the default foreground.</P>
Figure 6-1

Figure 6-1. Declared color versus default color

TIP

In Figure 6-1, the default foreground color is black. That doesn't have to be the case, since users might have

The default value of font-style is, as we can see,normal. This refers to "upright"text, which is probably best described as "text that is notitalic or otherwise slanted." The vast majority of text in thisbook is upright, for instance.

That navbar, then you need only add this rule:

#navbar A:link {color: yellow;}

This will change the color of hyperlinks within the navigation bar without affecting other hyperlinks throughout the document.

6.1. Colors

There is really only one type of color in CSS, and that's plain, solid color. If you set the background of a page to be

8.2.4. Block-Level Replaced Elements

Block-levelreplaced elements are also subject to a few differences in howformatting is handled. The most important is that replaced elementsare assumed to have an intrinsic height and width; for example, animage will be a certain number of pixels high and wide. Given this,if either height or width areset to auto for a replaced element, then the valuewill always evaluate to the intrinsic height or width of the element.Thus, if an image is 150 pixels wide, and its