Half-way thru new (650-page) Head First XHTML/CSS book. Completed first 7 chapters, which cover all things pertaining to HTML/XHTML (the *structure* of a web page, such as setting up » headings, paragraphs, images, links).
Clearly tho, this book was written for those who know (absolutely) nothing about HTML or web site development (uh, not me).
To this point, I've (already) known most of what the book has been teaching .. tho the last few chapters, increasingly, have shed light on gaps in my knowledge. Examples of things I never knew:
••••• today's entry continues below •••••
- image <img> tags should go inside block elements, such as paragraphs <p>, and NOT stand on their own (as I've previously been known to do).
- the <blockquote> (which I like to use) should contain one (or more) block elements, such as the paragraph <p> (.. makes no sense to me).
- NO block elements (such as the <blockquote>) should go inside the paragraph <p> element (confusing, I know, in light of previously-mentioned item. Had to read it twice myself.)
- lists (both ordered and unordered, which this bulleted item is part of) should stand on their own and NOT go inside a paragraph <p>.
- image <img> tags should contain an ALT attribute (not optional, as I previously thought).
In the above examples, the word should means » in order to write valid XHTML mark-up. Browsers will display regardless.
Spent considerable time researching the <meta> tag, especially as it relates to character encoding and character sets (charset) .. specifically » IS0-8859-1 vs UTF-8, which is the default charset for XHTML. Long story short > best to use UTF-8 for XHTML.
Book spends much time espousing the advantages of XHTML (over HTML), none of which however, did I find very compelling .. such as (XHTML is...):
- newer (alas, newer is not always better)
- compatible with cell phones & other mobile devices (yeah, so what?)
- allows use of aural screen readers for the visually impaired (noble, but this probably doesn't represent a significant percentage of Rad readers)
- has XML's eXtensibility, including the ability to create new mark-up languages (not something I'm interested in right now. I have enough languages to learn already, thank-you.)
- compatible with XML-capable software (uh, like what?)
- makes it easy to put XML data on the web (too bad I don't have any XML data)
- will future-proof your web pages (this is the only advantage that really interests me)
Found it interesting that XHTML is really XML, not HTML (as I previously thought). This begs the question, then » why does every XHTML document begin (and end) with an <HTML> tag (called the root element), and not <XML> or <XHTML>???
One thing I *have* decided to do (since reading this book) is » begin writing all *new* web pages (such as the Guide to Norton Ghost 12) as XHTML Strict (not Transitional, as I was doing before). Just as easy to write new pages Strict, which will help me learn the language better.
More reviews on this book (146 of them) listed at » Amazon.com. Now on to Chapter 8 (« 3-MB PDF), Head First's showcase chapter.
Said he also surfs the web on his PDA, and that Apple's new iPhone can surf HTML pages.