Information Technology Reference
In-Depth Information
IV
You think the picture of the bougainvillea should go right after the number, so a visitor can see
what they are doing before reading the step. A properly setup XML editor won't let you do that,
period. In XHTML, you get an error.
Troubleshooting Note
The W3C Validator offers explanations for some error types in its report, and always tells you
where the error occurs. When you select the Show Source option, the Validator includes a link
to the offending line, so you can look at where this problem lies. Making changes to the code
must be done outside the Validator page, in whatever editor you use to create your posts.
As is often true of software debuggers, though, sometimes the real cause of the problem is
located a few lines before. So when the Validator complains that you omitted an end tag (such
as </p> at the end of a paragraph) and things look right on the offending line, check for an
extra opening tag (such as two consecutive <p> tags).
Also, many of the errors flagged in our example appeared in sidebar widgets. In the
WordPress.com environment (where the example lives), you might want to alert the theme
designer that there are standards problems with widgets, but there's not much you can do
directly. When you are using the self-hosted WordPress.org software, you can edit the CSS
directly to resolve the issue. A note to the theme developer may still be a good thing, as many
of them work hard to comply with the XHTML standard.
As you can see, there is much to be learned in creating standards-based web pages. Wikipedia has
a list of some of the more common errors in writing and editing standards-compliant XHTML. Find
this at http://en.wikipedia.org/wiki/XHTML#Common_errors.
Introducing CSS
Cascading Style Sheets take all your design decisions and basically put them all in one place, sepa-
rating content in WordPress from presentation. This allows HTML tags to display differently
depending on the context within a page or site.
In this section, we discuss the basic style sheet.
What CSS Is Meant to Do
Maybe you don't think you know what a style is, but you're wrong. In a word processor, you've
seen that word Normal or Default or something similar in the upper-left corner. Perhaps you've
clicked on the drop-down menu to see what else is there. Maybe you've even clicked on one of the
entries to create a heading in a document. If so, congratulations! You've applied a style to a docu-
ment. That style came from a style sheet, which word processors tend to call a template.
Search WWH ::




Custom Search