HTML & CSS The Good Parts
If ever a book was misnamed then this is it. While this book does identify the worst parts of HTML and CSS for you it also misidentifies many of the bad parts as good.
My Rating: ![]()
![]()
![]()
![]()
![]()
Pros
- Tells you not to use some of the absolute worst parts of HTML and CSS and gives reasons why.
Cons
- Recommends using many of the bad parts of HTML and CSS instead of limiting the recommendations to the actual good parts.
- A rather jumbled approach to the subject with lots of incorrect information.
- Doesn't understand the difference between HTML and XHTML as demonstrated by the comment about legacy useragents and leaving a space before the slash in self closing tags. Those pages that have the space there are HTML and not XHTML, it is just using an XHTML doctpye on the HTML in that instance. <
- Claims HTML has had a doctpye since version 1.0. HTML 1.0 was not based on SGML and so did not have the SGML doctype tag. Only HTML from version 2.0 is based on SGML and therefore has a doctype tag.
- The conditional comments referred to on page 24 are not IIE condiitional comments, they are Microsoft conditional comments and many different Miicrosoft programs support them. Their main reason for existing is to be able to export a file from a recent version of Microsoft Office and import it into an earlier version while retaining as much as possible of the formatting.
- On pages 34 and 35 promotes the use of px for defining sizes in the CSS. Any use of pixels in CSS with the exception of defining border width is actually bad as it causes page layouts to break when your visitor starts resizing your text. Also the pitch figures given for CRT screens are wrong since with a CRT screen the actual viewable area will always be smaller than the nominal screen size by a variable amount.
- The description of the purpose of the "alt" attribute on page 179 is wrong. The alt attribute is there to provide an alternative text equivalent for thos people who can't see the image (eg. those using a text only browser or screen reader). It should not repeat information presented elsewhere such as in a caption or tooltip. There are also very few instances where it should be empty since deciding that it should be empty probably means that you are dealing with a background image that belongs in the CSS rather than an image that is a genuine part of the content.
Description
- First Edition: February 2010
- 318 page paperback
- Published by O'Reilly Media
- ISBN: 978-0-596-15760-9
- Author Ben Henick
Review
This book has completely the wrong name. It should have been called "How not to write your HTML and CSS". While the book is divided into chapters with only one chapter labelled as "The bad parts", that chapter actually contains just the worst parts. The bad parts are actually scattered through the book masquerading as good parts.
I am not even going to attempt to list what things the author got wrong in this book as doing so would require that I write a book at least the size of the one I am reviewing in order to explain it all properly.
To be fair to the author of the book I will mention one thing that the book gets wrong just as an example. Its a huge example too since it impacts on much of the book content. - Back at the end of the 20th Century a new version of HTML was developed called HTML 4. The idea was to get rid of all the bad presentational HTML and replace it with CSS. Note that the standard said way back then that these presentational HTML tags are bad. Of course it was a few years before all browsers properly supported HTML 4 but by about 2004 or 2005 it was possible to write web pages that comply with the HTML 4 standard and which work in all commonly used browsers. Now of course some people had already got lots of web pages that were written to the old HTML 3.2 standard and converting them all to HTML 4 would take a long time. To cater for all these old pages the new standard defined two different doctypes that can be used - a strict doctype for pages written using just HTML 4 without all the bad tags (which the standard listed as deprecated) and a transitional doctype that allowed all the bad HTML 3.2 tags while the page is being slowly transitioned from HTML 3.2 to HTML 4 by removal of these tags defined as bad by the standards. The author of this book actually recommends allowing tags that according to the standards are bad by recommending the use of the transitional doctype on page 13 of the book as the doctype to use for new projects.
Unfortunately, while there are a few sections in the book that actually do provide useful information about the good parts of HTML and CSS they are scatterd in amongst bad parts masquerading as good to such an extent that unless you already know what this book is supposed to be teaching you have no way of identifying which is which and if you do already know it then you don't need the book.
More Information from the Publisher
Related Articles
- The Navigation Bar
- Absolute and Relative
- The Site Owner's Attitude
- Creating a Common Navigation Panel without Frames.
- XHTML Reference



