Slashdot Mirror


Web Standards Solutions

William Nichols writes "With a couple of projects coming up that are going to require complete W3C CSS and XHTML validation (with 1 client requiring just a pure CSS layout) I thought it was time to brush up on some CSS knowledge, and maybe learn a new thing or two. I have spent the past week with a newly released book (and one of the smaller CSS books out there), the Web Standards Solutions The Markup and Style Handbook. The author, Dan Cederholm, has now become my right hand man, so to speak." Read on for the rest of Nichols' review. Web Standards Solutions: The Markup and Style Handbook author Dan Vederholm pages 253 publisher Friends of Ed rating 8.5 of 10 reviewer William Nichols ISBN 1590593812 summary A clear reference on designing with XHTML and CSS through a standards based approach

With the title Web Standard Solutions (which we will refer to as WSS from here on), you might expect this to be a book that is going to solve your problems, and without disappointment that is exactly what is does.

WSS takes a problem based approach instead of the commonly used project based approach to teaching you the value of designing to strict standards. I found this approach very refreshing, WSS kept my attention by presenting a problem, and then presenting 3-5 solutions on how to accomplish the task at hand. With each example Dan takes you through several ways to achieve the required result. Each of the methods shown are common patterns that different developers/designers would use, and the pros and cons of each are well articulated.

A lot of you may know Dan from his Simplebits. website. If you frequent Simplebits you will immediately recognize his style in the writing of WSS. Much like the mini quizzes that are used on his blog, this book is really a compilation of the hurdles that you are likely to face when trying to design to strict standards, and the solutions presented will get you over them.

WSS will also help the budding developer realize the business value of designing to standards. Once you start designing with standards, search engine rankings can jump, continued maintenance becomes a breeze, and the accessibility to screen readers (or other requirements) can be elegantly met.

One of my favorite parts of the book is the in-depth techniques used to style lists. WSS shows you how to take a regular non-formatted list and, using CSS, style it in several ways: as a vertical shopping list; without bullets and indenting; with custom bullets; and eventually as a horizontal navigation bar with changing bullets.

This book really stands out when covering the most basic foundations of layout such as paragraphs, lists, headers, titles and the like. The first half of the book really gets into the proper use of the most basic CSS techniques and proper selection of tags for headings, quotations, etc. While the second half of the book requires you to use what you have learned along the way to start building CSS based layouts.

If you are a regular at some of the advanced sites like CSS ZenGarden or A List Apart this book may be a little basic for you. Even still you will probably be able to take some techniques from it that you can use, this book is really more for the designer that is capable but not quite deadly with their CSS knowledge.

Overall I would give Web Standards Solutions the Markup and Style Handbook an 8.5 out of 10. I really think it does a fantastic job at keeping the reader interested in the subject (something that is often very hard to do in technical books) and will definitely be a great business tool for you. A quick read it is, but a valuable reference that has earned a spot next to my keyboard, my 3 bars of caffeinated soap, and the trusty case of bawls.

You can purchase Web Standards Solutions: The Markup and Style Handbook from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

26 of 157 comments (clear)

  1. Definition of Irony: by Neil+Blender · · Score: 5, Funny

    A book review on HTML standards posted on Slashdot.

    1. Re:Definition of Irony: by z0ink · · Score: 4, Interesting

      You're telling me. Check out this series of articles written for A List Apart, an e-zine dedicated to web standards.

      --
      Steal This Sig
    2. Re:Definition of Irony: by cephyn · · Score: 3, Insightful

      wow i had no idea a changeover would save /. so much on bandwidth costs. the fact that they patently refuse to update the sitecode is mindboggling.

      --
      Moo.
    3. Re:Definition of Irony: by The+Bungi · · Score: 4, Interesting
      Especially funny given that the "perl hackers" have explicitly blocked the W3C validation service from hitting their circa 1997 table-laden crappy HTML and making them look even more stupid.

      BTW, this has been active at least for three years, but very few people know about it.

  2. error in the infobox in the review by darxpryte · · Score: 3, Informative

    looks like his name is Vederholm instead of Cedarholm in the stats box on the review. Minor pebkac!

  3. Karma whoring information by bartash · · Score: 5, Informative

    The book has a home page here where you can download a sample chapter.

    --
    Read Epic the first RPG novel.
  4. Sounds interesting by RangerRick98 · · Score: 5, Informative

    I'll have to check that out, along with the sites you mentioned. I do a lot of web design myself, and I've found the W3C's site to be a pretty helpful reference for what I do, but I'm always interested in learning more from additional sources. Incidentally, another helpful tool when doing CSS is the EditCSS extension for Mozilla Firefox. It can save some time in trying to get everything looking just right.

    --
    "You're older than you've ever been, and now you're even older."
  5. Tip for auto-validating PHP generated XHTML by Boss,+Pointy+Haired · · Score: 5, Informative

    During development, you can easily setup PHP.XPath to automatically validate every page you create.

    Simply turn on output buffering at the top of your script using ob_start(). It's best to do this in a common header script called by all your pages.

    Then, in a common footer script, load the output buffer (retrieved as a string using ob_get_contents()) into an instance of PHP.XPath using the importFromString method.

    If your page displays, it will at least be valid XML (most of the way towards being valid XHTML). If you break the well-formedness of your output your page will not display because PHP.XPath will raise an error.

    1. Re:Tip for auto-validating PHP generated XHTML by linuxbaby · · Score: 4, Informative
      Here's another thing you can (and some say SHOULD) do for that same purpose.

      Put this at the very top of every HTML page:

      <?php
      /* XHTML proper header for browsers that accept it. If using Mozilla, this is one way to make sure your XHTML validates */
      if(isset($_SERVER['HTTP_ACCEPT']) AND stristr($_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml'))
      {
      header('Content-type: application/xhtml+xml');
      }
      else
      {
      header('Content-type: text/html');
      }
      ?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
      < html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

      Then if you do your development in Mozilla/Firefox, it will die any time your XHTML is malformed.

      It has the added benefit of something you would leave in on your production server.

  6. re standards by computerme · · Score: 4, Insightful

    FYI,

    Neither S in CSS stands for "Standard". What i mean but that is that do NOT expect CSS to give you a right once play on any browser with the same results.

    CSS is great to reduce download speed of pages. To keep all the style in one place. To separate logic from data. But do not think writing a web site in CSS will solve all your browser compatibility problems.And don't fall under the influence of some elitist CSS religion.

    The amount of hacks, even by the experts, required to even get close to modern browser compatibility is really hilarious. (ooops i mean painful.)

    So get into CSS. Use all the great features in offers, but remember that its not magic bullet.

    Yes, i'm sure there are some simple sites that can be pulled off with CSS and look pretty much the same but honestly, when you reduce your site to this level, they ALLL look alike:

    -header graphic
    -2 or 3 columns
    -a sort of anasepctic feel to it.

    In the mean time, stick with a combination of CSS AND minimal tables.

    Don't believe it? FIne, its not my hair that you will pulling out ;)

    1. Re:re standards by TedTschopp · · Score: 4, Informative
      Yes, i'm sure there are some simple sites that can be pulled off with CSS and look pretty much the same but honestly, when you reduce your site to this level, they ALLL look alike:

      Ummm... you might be suprised at the varity that is allowed when you know what you are doing with CSS. I would have to say that the sites at CSSZenGarden look quite different. I could point out other examples, but I'll promote a bit of myself, just click on my URL and check out the code for both the front page and the Forums. Both use tables only on imported content from outside sources. The rest is full CSS.

      Ted Tschopp

      --
      Fantasy remains a human right; we make in our measure and in our derivative mode... -- JRR Tolkien
    2. Re:re standards by typhoonius · · Score: 5, Informative

      I would have to say that the sites at CSSZenGarden [csszengarden.com] look quite different.

      Funny you should mention it. I followed your link and checked out the C-Note design, which has overlapping text in the sidebar in Opera 7.5. Whoops.

      The grandparent is right in that CSS is not a panacea for designers and that it can be hard to guarantee perfect compatibility.

      However, for the CSS Zen Garden, no matter how badly the CSS renders, I can always just drop into user mode and read the content thanks to its lovely semantic mark-up (of course, the design is the site's draw and not the content, but that's beside the point). In my opinion, flexible data is more important than pixel perfection, so I ultimately disagree with the grandparent's half-hearted tables-with-CSS approach. Clearly, you'll never, ever get pixel perfection for every user without a lot of hacks (using tables for anything other than tabular data is a hack), so you should really just give up and focus on fluid designs.

      (And yes, I know, ideals don't get you far with clients and compromise is often necessary, but maybe you should be compromising your design whims for accessibility instead of the other way around?)

    3. Re:re standards by jgalun · · Score: 3, Interesting

      I love CSS Zen Garden. It is an amazing site. And, you're absolutely right that not all CSS sites need to look the same (I like to think that my site, which totally relies upon CSS for design, does not look like every other "CSS site" out there). That being said, I do agree with the original poster's sentiments to a large degree.

      Off the top of my head (finishing a long day at work):

      1) CSS Zen Garden is great, but it's much easier to mess around with CSS style-switching like that when you have only one page to support. It becomes much more difficult to do when you have a lot of different pages with different types of content and different amounts of content on different pages.

      Plus, a lot of the designs on CSS Zen Garden are eye-catching - but hardly useful (and rather distracting) if you are trying to make a serious site geared towards content delivery. This it not a slam on CSS Zen Garden at all, which is, after all, supposed to show that CSS can deliver the goods when it comes to amazing graphic design. Just that, at the end of the day, what matters is normally intuitive content delivery wrapped in a good design, not being able to switch styles.

      2) It can still be quite a bitch to get CSS to work the same in Opera, Mozilla, and IE.

      3) Given the difficulty of getting CSS stylesheets to work correctly across all browsers, you have to ask yourself - doesn't it make more sense to use tabular design and some content management system that contains templating features, rather than struggling with the theoretically cool but difficult to implement CSS design switching?

      4) One of the things that initially attracted me to CSS was the possibility of creating web pages that are more accessible to sight-impaired and motion-impaired users. But, after much effort, it has become clear to me that CSS is not a magic bullet for this at all. First of all, tabular design is not as inaccessible as it's made out to be. Screen readers are very good at dealing with tabular design by now. Secondly, there are a lot of situations where CSS has no bearing on the issue. For example, if I have a budget tool that I want to update costs on the fly, that will wreak havoc on screen readers, regardless of whether CSS is used or not. (More generally, web standards are no magic bullet. For example, let's say we have a tool where most users will benefit from being able to click on an item and have a pop-up window appear with more information on the item. Now, some users will have JavaScript turned off, meaning that the budget item link should use TARGET=BLANK for those users. But according to HTML 4/XHTML 1 Strict, you cannot use TARGET=BLANK any more, because that would be mixing content and design. In theory, the W3C is absolutely right. Where the link opens is a design issue, and should be handled by manipulating the DOM, not in the anchor tag itself. But, unfortunately, theory leaves those users with JavaScript turned off with a much lesser experience, becuase they would benefit from viewing both the additional information in the pop-up window and the information they were viewing previously at the same time on the screen. Maybe that's the right trade-off to make, but it's still a trade-off.)

      5) The idea that with different stylesheets you can support radically different user agents - Palm users, WebTV users, users with 640x480 resolution, users with 1024x768 resolution, screen readers, etc. - is a great idea. I question how many sites have actually put it into action, though. Let's be honest - how many site really have a need to deliver information to users across all those user agent types yet? And, if you do have such a need, you're probably a huge site where it may make more sense to - again - use an advanced CMS that can handle that by relying on custom conversion from XML to whatever template you have for the different user agents, rather than CSS.

      6) CSS would become much more useful if we could get some of the features that were be

    4. Re:re standards by tokachu(k) · · Score: 3, Insightful
      In the mean time, stick with a combination of CSS AND minimal tables. Don't believe it? FIne, its not my hair that you will pulling out ;)

      I don't believe it. Consider the following:
      Internet explorer is the dominant browser... (well over 90%) ...and it doesn't support CSS fully. (not much CSS1, and no CSS2) It's incredibly easy to lay out a complex web site without using table hacks when you use CSS and have a dominant browser that fully supports it. The problem is that only browsers based on Mozilla code (Camino, Firefox, Netscape, etc.) have support for these standards. There's nothing wrong with the standards out there currently, but there is something wrong with the people who don't obey them on the application (server) level.

      It's a tad cliche, but Internet Explorer is doing more harm than good without all its serious security problems.
  7. Re:Definition of Expected: by TedTschopp · · Score: 4, Insightful
    And why buy a book when you can read the W3C recommendations/specifications for HTML/XHTML and CSS that are (imo) very understandable and easy to read?

    Becuase many times the standards do not tell you elegant solutions which people have used in the past.

    Kinda like the difference between English class and Creative Writing classes

    Ted Tschopp

    --
    Fantasy remains a human right; we make in our measure and in our derivative mode... -- JRR Tolkien
  8. Excellent Reference by playgod · · Score: 3, Interesting

    I picked up this book last week. I found it an excellent read and suitable for CSS users both novice and advanced. It gave me a couple ideas for ways to do these and further illustrated the necessity of web standards compliant design.
    I also bought it because I met the author at the 2004 TOevolt Conference and he gave a great seminar and was a cool guy to boot.
    It also spends some time on web accessibility, something all developers really need to start thinking about.

  9. SAT analogy by downward+dog · · Score: 3, Interesting


    CSS/XHTML :: traditional HTML

    as

    hand-coded HTML :: Frontpage 98

  10. Standardisation = Complicating Stuff by Dante+Shamest · · Score: 3, Interesting

    Imagine if the Internet had started out with today's newest XML standards back in the early 90s. Imagine that browsers were strict and accepted only standards-compliant code. To design a site you'd have to know strict XML and understand DOCTYPES and all that. The layout of your webpage would be strictly defined by CSS 2.0, which means you'd have to learn that too.

    Would the Internet have flourished? Maybe. But I bet adoption would have been slower. It would have certainly put off alot of people trying to create a simple functioning webpage.

    Heck, it might have caused some genius to invent a simpler alternative to XML/CSS

    1. Re:Standardisation = Complicating Stuff by downward+dog · · Score: 5, Insightful

      So a web designer would get an error (Error: no closing tag) and would give up and go home? Amazon.com wouldn't be able to find programmers who knew how to write lowercase markup?

      Wouldn't you rather have a human being decide how a page should look, rather than having a web browser GUESS what to do with invalid code? That is basically what web browsers have been doing for years. Hmmm, thought Mozilla, no closing </a> tag. Should I end the link at the paragraph break, or let it extend across four table cells to the next link?

    2. Re:Standardisation = Complicating Stuff by RAMMS+EIN · · Score: 3, Insightful

      I hardly think so. There is nothing more difficult about XHTML than HTML.

      If you had wanted to build the whole web around XML and CSS, all it would take is for one person to create a Schema and for one person to create a stylesheet, which could then be used by anybody else. This is, in fact, exactly what happened, except that the stylesheet was hardcoded in the browser, and the Schema defined in some standard document.

      --
      Please correct me if I got my facts wrong.
  11. Re:Foolish Projects by downward+dog · · Score: 3, Insightful
    HTML and CSS are something that can be written by any school kid, and you and I both know that your average school kid doesn't know the ins and outs of the CSS and XHTML standards, and probably never will.

    Wait -- and you think it is foolish to exclude the average schoolkid from coding large web projects?

    Whenever people say that "anyone can learn HTML," I laugh. That's like saying that "anyone can use Photoshop" because anyone can hit ctrl-i to invert an image. Sure, anyone can learn what means, but can anyone create clean, efficient, browser-compatible code that is easy to maintain and intuitive for multiple developers to use? And create it quickly? That is where web standards come in.

  12. Re:Dupe? by Saeed+al-Sahaf · · Score: 3, Funny
    but the author of the article seems to be an utterly clueless idiot.

    Well, he is a web developer!

    --
    "Who are in control, they are not in control of anything - they don't even control themselves!" - Glen Beck
  13. An assload of useful online CSS resources by mmmuttly · · Score: 5, Informative
    Misc.

    Lists

    Floats

    Filtering

    • Explorer! - + - this is extra copy so this would post
    • safari filtering! - + - this is extra copy so this would post
    • filters! - + - this is extra copy so this would post

    Type Issues

  14. Not So Easy by Nurgled · · Score: 4, Interesting

    The articles on A List Apart create a static HTML mockup of the front page. However, there's more to Slashdot than the front page, and it's not just a matter of copying that mockup onto the site and having done with it. The Template Toolkit templates have to be rewritten to use the new code, and similar new markup and CSS must be written for things like comments, the comment form, the nutty little boxes and so on.

    CowboyNeal has said repeatedly that if someone was to submit a complete, working template he'd consider making use of it. Also, more recently it was claimed that someone was working on one. The software that powers Slashdot is an open source project, and Template Toolkit is not specific to Slashdot and pretty well documented. If it really bothers you, scratch your own itch and submit a patch.

    1. Re:Not So Easy by Nurgled · · Score: 4, Informative

      The Perl bit is already written. You just need to write a set of Template Toolkit templates. I seem to remember from looking before that the way they are used in Slash is pretty obvious once you find the template files in the source distribution.

  15. Ooooh... CSS! by miikrr · · Score: 3, Interesting

    Should I be suprised that I see no the mention of CSS3, let alone CSS2(everything is just stated as "CSS"), anywhere on Slashdot, the book's synopsis, reviews, or even the author's own website?

    For all I know, it just teaches you Microsoft's faulty CSS1 specification they used back during the release of Internet Explorer 3.0 back in 1996, exciting! What could be better worse than this? Lots of things, I'm sure, but even Cascading Style Sheets For Dummies mentions CSS3 which Opera and Firefox/Mozilla support.