Head First HTML with CSS & XHTML 197
Graeme Williams writes "In the past, I've written the sort of poorly-structured non-compliant web pages that can only be produced by a combination of laziness and confusion, so I'm an ideal test subject for Head First HTML with CSS & XHTML, an introduction to building web pages which focuses on compliance with the most recent HTML 4.01 standard and XHTML 1.0 standard. The book starts with the simplest of web pages, and builds from there to a solid foundation for writing simple well-structured web sites. It's clear and thorough, and will be effective both for the complete beginner and in bringing stale skills up to date." Read on for the rest of Graeme's review.
Head First HTML with CSS & XHTML | |
author | Elisabeth Freeman & Eric Freeman |
pages | xxxv + 658 |
publisher | O'Reilly Media |
rating | 10 |
reviewer | Graeme Williams |
ISBN | 0-596-10197-X |
summary | A clear, effective and readable explanation of standards-compliant HTML, XHTML and CSS |
This is one of those cases where you can judge a book by its cover. In addition to the title and author, the cover of Head First HTML with CSS & HTML has seven tag lines, four photos and two drawings. One of the nuggets is, "A learner's guide to creating standards-based Web pages", which is a pretty good summary of the book and its intended audience.
Head First HTML is full of the sort of distractions that would normally make my skin crawl: people talking at me from the margins, mock conversations between inanimate objects (or in this case HTML tags), crosswords, quizzes and enough cute graphics to supply the kindergartens of a fair-sized city. It's clear that the authors realize that there might be some resistance to this style because they devote five pages of the introduction to explaining why they wrote the book this way – the summary of the summary is that novelty helps your brain learn. The example chapter you can download from the web site for the book is more than 50 pages, which might be enough for you to make up your own mind whether this works for you. My experience was that the method is so effective and the material so clearly presented that the issue disappeared for me after a chapter or two.
In the introduction, the authors also mention another goal: "a clean separation between the structure of your pages and the presentation of your pages". HTML or XHTML is used to provide the structure and content of a web page, and CSS (Cascading Style Sheets) are used to provide the style and layout. This means that the book doesn't include many HTML elements which are now discouraged or "deprecated", such as <B> for bold, <CENTER> for centered text, or <FONT> for specifying fonts within the web page. I guess the choice between frames and CSS might be classified as a religious one. In any case, this book is about CSS and doesn't mention frames except to note their omission in the appendix.
Most of the examples are based on a fictional coffee company called Starbuzz, and their trendy competitor, the Head First Lounge. It's a great framework for building up a web site from a few linked pages to a complete CSS layout. If you've never written a web page before, the book starts at the beginning, with the simplest web page followed by links from one page to another. If, like me, you've written a handful of web pages, reviewing the material will help focus on the essentials for a clean, compliant web page. All of the example HTML, CSS and accompanying images can be downloaded from the web site for the book, which also has the completed examples online, so you can quickly review them in your browser. If you're considering buying Head First HTML, the online examples are also a great way to see the scope of the book, from the simplest example to the most sophisticated.
There are a few prerequisites for getting the most out of Head First HTML. Adobe Photoshop Elements is used to show you how to prepare images for the web. As the book says, if you don't have it, you can download a free trial from Adobe, with the small quibble that this won't work if you've already run through your free trial before starting the book.
Understandably, Head First HTML doesn't tell you everything you might ever need to know about CSS. On the other hand, you learn a whole lot about using CSS both for appearance (such as colors and borders) and layout (positioning different parts of the page such as headers and sidebars). The book is particularly good at explaining at least some of the limitations of CSS, such as the different compromises of liquid, jello and frozen layouts. It's easily enough for you to be able to continue learning or experimentation on your own. With forgivable cuteness, the book also frequently mentions the availability of other O'Reilly publications with more information, such as HTML Pocket Reference and CSS Pocket Reference.
Similarly, the book gives a clear presentation of the different ways of setting text size, but doesn't provide the last word. If you're looking for Javascript to automatically size text based on screen resolution and browser width, you'll have to look elsewhere. In fact, Javascript is one of the ten things mentioned in the appendix, "The Top Ten Topics We Didn't Cover", leaving room for Head First Javascript to be published in 2006.
The last chapter provides a brief introduction to forms, including example designs both with and without tables. The goal of the chapter is to show you how to use CSS to style and layout forms, but you can't try out a form without something on a web server to process it, so the book's web site includes a simple-back end which will "process" (really just echo) the forms which are submitted to it.
Head First HTML deserves its score of 10, but that doesn't mean every word is perfect. I wasn't comfortable with the description of CSS borders, margin and padding until I'd gone back and re-read it. And it wasn't obvious to me that the background of a margin (such as a dashed margin) is the same as that of the content area it surrounds until I'd worked through some examples on my own. But that just underlines the fact that the book is so readable that I could tell when my understanding was slipping.
While Head First HTML never claims to be a reference, information is presented very clearly. If you forget the differences between HTML and XHTML, the book's excellent summary is easy to find, and includes a discussion of the W3C HTML and XHTML validator. That said, the index is short and idiosyncratic: there is a list of page references for the Q&A sections (under T for "There are no dumb questions") but transitional HTML is indexed only under "HTML, transitional", and jello, the layout, is found under "Design" but not "J" or "Layout".
I've said that I was initially very skeptical about the graphics-heavy Head First Labs house style. I'm pretty sure I've been thinking in prose all my life, but apparently verbal and graphical perception can be safely intermingled. I can't explain why, but this garden salad of words, pictures and diagrams of all kinds provides a easy-to-read and very effective introduction to a large amount of material."
You can purchase Head First HTML with CSS & XHTML from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
More HTML books need to talk about CSS (Score:5, Interesting)
I'm actually being forced to take a class in introductory web design. The books for this class are fairly new, yes seem to be stuck in the HTML 3.x days, with font tags, bgcolor properties, and a particular emphasis on the 216 (215?) web-safe colors.
I wish books like this one were used instead. Teaching the right way the first time is so much easier than having to tell someone that everything they learned was wrong.
Re:More HTML books need to talk about CSS (Score:4, Interesting)
Re: (Score:2)
Re:More HTML books need to talk about CSS (Score:4, Funny)
Re:More HTML books need to talk about CSS (Score:5, Interesting)
No work around is easy. On a site with 50 different elements if it takes me ten minutes per element to figure out a work around I just spent 500 minutes making the site work in IE. That's pretty much a whole work day. If I have to do that for IE6 and IE7 now that means two work days. That is best case scenario too. Now and then I find an issue with IE that in itself takes me an entire day to work around. I'd say that for every website I produce I spend around a week just finding issues with non compliant browsers and finding work arounds. So figure it costs about $1200 per website to fix these problems. That is a lot of money when you figure I produce a dozen or more websites a year. Let's just say that in my work alone $15,000 a year is spent fixing problems with IE and that still doesn't make the websites look as good in IE as they do in Safari and Firefox. IE nearly doubles the amount of time it takes me to make a static website.
Re:More HTML books need to talk about CSS (Score:3, Insightful)
...then you're in the wrong line of work.
Seriously, we all know that IE's handling of CSS is buggy as hell, and there are plenty of bugs in other browsers, too. However, the vast majority of problems come down to the same half-dozen or so "frequent offenders", and the circumstances when they arise and the workarounds for them are widely known and readily available for the price of a search engine que
Re:More HTML books need to talk about CSS (Score:2)
Re:More HTML books need to talk about CSS (Score:2)
Like any profession, it's easy to start out doing something the easy way because you don't know any better. Unfortunately, we can trace a lot of the reason that people don't do it the right way to their formal education. Like you said, pretty much everything the newbies are learning is old hat or deprecated.
My alma mater teaches how to "write HTML" using Dreamweaver, along with the concepts of "styles", which is really the lame .style1, .style2 font effect crap that DW pulls. Basically, nobody comes out of
Re:More HTML books need to talk about CSS (Score:2, Insightful)
Deprecated HTML elements (and browser sniffing) will be around for as long as Microsoft refuses to fix MSIE. This includes MSIE 7.0.
Re:More HTML books need to talk about CSS (Score:3, Informative)
Since I teach a course that includes XHTML and CSS, publishers often send me every web-related book they can think of, in the hopes I will adopt one as a text. Most are horrible. The number of vaidation errors in example code is astounding. I had always assumed that those who wrote books took some time to actually learn the material first. Apparently not.
The Head First book is the first one I have ever seen that treats the whole subject the "right" way, rather
Uh-oh! (Score:4, Interesting)
Can somebody say lawsuit?
As to the book itself, I looked at the sample chapter and it's in the random, jumpy style that marks the modern MTV generation. It has some appeal, but I think trying to get through a whole book laid out like that is going to cause headaches. Still, I plan to buy it, just to see if I can learn anything new.
Re:Uh-oh! (Score:5, Insightful)
As to the book itself, I looked at the sample chapter and it's in the random, jumpy style that marks the modern MTV generation.
That's what I thought, too, until I read the preface to Head First Design Patterns. Turns out that the pictures, humor, etc., have actually been proven to improve learning and retention.
Re:Uh-oh! (Score:5, Interesting)
As someone who has read several in the "Head First" series, this is definitely true in my experience. Most books are designed to cover a subject with little emphasis on teaching it. Head First books are designed specifically to teach you, and they go to great effort to do so. Think about it: do you retain more per hour spent watching the History Channel, or reading a dry all-text history text-book? Remember, the book can take dozens of hours to read. The text-book may provide more complete content, but that doesn't matter much if you've forgotten much of it within a few months.
You will remember what a Head First book teaches you, and you won't need the book as a reference like most text-books.
If the grandparent wants to stick to all-text, old-world books, he can go right ahead. But he should try a "Head First" book before he criticizes it.
As for his reference to the MTV generation, that is simply misplaced. Children and young adults have despised reading boring text books since the invention of the alphabet. Don't let nostalgia The difference is that today they cannot live a high quality life without knowledge. I, for one, commend innovators like Bert Bates and Kathy Sierra for making sure that there are better options for learning that is rewarding for people of nearly all ages.
Re:Uh-oh! (Score:2)
Focus (Score:2)
They use a flashy style to draw attention to particular concepts. It is used to FOCUS.
That is very different from what I consider MTV-editing, which is used to abstract, or pile a bunch of images/concepts into a single "idea", or feeling. There is no focus.
Re:Focus (Score:2)
(I'd be really impressed if they actually did that via CSS. But I'm prepared to be disappointed.)
Head First Style (Score:2)
This book can't be good... (Score:4, Funny)
Re:This book can't be good... (Score:2)
Especially on porn sites...
Head First! (Score:5, Insightful)
While I haven't read this particular Head First book, I have nothing but praise for the rest of the series.
The 'Learner's Guide' is exactly right; they explain everything they do clearly, they make the examples and exercises fun and easy to understand, not only on what to do, but why to do it. The books are graphically appealing and funny (and it's not just nerd humor), which makes them easy to read, but at the same time they don't sacrifice information, or simplify it beyond understanding.
Sight unseen, I would recommend this book, the same way I do their other ones.
Re:Head First! (Score:2)
choice between frames and CSS? (Score:2, Informative)
Re:choice between frames and CSS? (Score:2)
eh? It's perfectly possible to use both. They don't exclude each other.
When most people compare frames and CSS, they are talking about layout -- specifically, using frames to position data as opposed to CSS absolute positioning. More often, people compare CSS to table-based layout, though.
Amazon has it for $23.07 (Score:3, Informative)
Re:Amazon has it for $23.07 (Score:4, Informative)
Re:Amazon has it for $23.07 (Score:2)
A slashdot book review
A comment saying "Amazon has it cheaper than BN"
How much is slashdot getting paid for these 'reviews?'
I'm not playing flame bite, I'm just getting a little bored of the 'oh look what a lovely book' articles. Come on guys, if I want ads with my content I'll watch TV, or remove the 1" strip of tape at the top of my monitor
You mean "laziness and ColdFusion" (Score:5, Funny)
Designing With Web Standards (Score:5, Interesting)
Zeldman is also teaming up with Eric Meyers, the CSS God for An Event Apart. [aneventapart.com]
Re:Designing With Web Standards (Score:4, Informative)
But this book is for beginners. I just finished reading it. I didn't learn a whole lot but I did pick up a few things I had either never known or forgotten about. I may give this book to my wife who'd like to write some pages for herself. She's a complete neophyte. But I think this book is really geared to people like her. I believe one of the blurbs on the book talks about how refreshing it is to see a book that will start off new html/css authors with a foundation in standards. That I think is the real appeal of the book. It shows beginning authors how to use html/css using standards. And it does it in an entertaining and instructive way.
I wasn't particularly fond of Head First Java but I love Head First Servlets and JSP. The humor in this is quite a bit tamer but it's still a very good book for someone either just beginning html/css or looking for a basic review.
Poorly-structured non-compliance laziness (Score:3, Funny)
Wait a minute, were you copying my style!?! [gmu.edu]
IMHO a MUCH better CSS/XHTML book... (Score:5, Interesting)
And it's cheaper [amazon.com] .
Not that great of a book for reference or learning (Score:2, Interesting)
Re:Not that great of a book for reference or learn (Score:2)
Re:Not that great of a book for reference or learn (Score:2)
Re:Not that great of a book for reference or learn (Score:2)
Re:Not that great of a book for reference or learn (Score:2)
That is frequently the case. A lot of people lose sight of the purpose of standards--to make things easier. And with that in mind, "Designing with Web Standards" is a great book if you can tune out the standards for standards' sake zealotry. For practical standards compliance I really recommend "Web Standards Solutions" by Dan Cederholm.
Re:Not that great of a book for reference or learn (Score:2)
Re:Not that great of a book for reference or learn (Score:2)
You're right, and I can admit it. It's been a while since I read the Zeldman book. I mentally grouped his book with what I used to see on ALA. And that was folks jumping through hoops to follow the web standards to no real benefit other than standards compliance. This wasn't, of course, the case every time, but it happened plenty. And at the time I was totally on board. Is it OK to use a <dl> to mark up a form? Does a form really count as tabular data? Do the benefits of FIR (standards compliance!) ou
Re:IMHO a MUCH better CSS/XHTML book... (Score:2)
Other markups (Score:3, Insightful)
Given that the market at the moment is trying to squeeze as much functionality out of existing technologies and the increasing use of new markup languages such as SVG and MathML, I would have thought that more and more books would start teaching XHTML/CSS.
XHTML will allow far better flexibility when adding in new functionality provided by new markup languages as well as better machine readability for the purposes of migrating pages at a later date. Tools to assist in developing syntactically valid XHTML pages are easily available and easy to use (such as Firefox's Validator tool as well as the old trusty http://validator.w3.org/ [w3.org]), so the argument that novices may break XHTML pages by not writing valid code is not as potent as it once was.
The challenge now lies in teaching students to write semantically correct markup. This cannot be checked by a validator or any other machine tool, as semantically incorrect markup may still follow the rules of syntax. However, it can break a braille browser or a mobile device that degrades pages' layout for the purposes of displaying it on a small screen, rendering the information inaccessible to users of these devices.
XHTML's stricter syntax far more strongly encourages users to think in terms of content/presentation rather than just writing a blob of HTML to show a nicely formatted essay/blog/gallery. The more information is both syntactically and semantically correct, the more the web will be a friendly place for users of devices other than PCs, or users who are accessing the web from a device designed to aid a disability.
It is for these reasons, forward compatibility and accessibility, that I think that XHTML should start being taught. I always hear it argued, when I recommend XHTML to a would-be developer, that "XHTML is not understood" and "it breaks pages if used incorrectly". Well, help users to understand, and teach them to use it correctly.
IE is your roadblock (Score:2)
Well, help users to understand, and teach them to use it correctly.
"Correctly" in this case meaning on private intranets and specifically not on the public World Wide Web, as all publicly available versions of the web browser with 85 percent market share do not read XHTML anywhere close to correctly. Microsoft Internet Explorer 6 doesn't display pages sent as application/xhtml+xml at all, and sending XML as text/html is considered harmful [hixie.ch].
Re: (Score:2)
Hixie and XHTML Appendix C (Score:2)
I also get referred to it regularly, as though it's some kind of brand new idea instead of the tired old elitist piece of trash that it is.
Is a well-written rebuttal to hixie's screed available on the web?
One can send XHTML as text/html to IE and correctly to other browsers.
But then you have to sniff the Accept: header and generate either XHTML or HTML 4 [damowmow.com]. This rules out users in environments that do not provide for dynamic content, such as ISP web space, university web space, and banner-supported
Re:Hixie and XHTML Appendix C (Score:2)
Not that I'm aware of, and I don't expect one to arise. The problem is that his argument is basically "Serving XHTML as text/html is harmful because people do it incorrectly!", to which the only really sensible reply is "Well don't do it incorrectly then!" The harm comes from doing it incorrectly, not the fact that you are doing it at all. Nobody's going to write a rebuttal, because that would entail arguing that doing it incorrectly
Re:Hixie and XHTML Appendix C (Score:2, Interesting)
The harm comes from doing it incorrectly, not the fact that you are doing it at all.
The point is that doing Appendix C "correctly" may prove to be more work than just sniffing Accept:.
you don't necessarily have to have dynamic content to do it. Apache MultiViews handles it without needing any scripting language, you just put 'foo.html' and 'foo.xhtml' into the same directory and link to 'foo'.
And then you have to 1. try to persuade your host to turn on Options MultiViews or .var files or both, whi
I'm halfway through this book right now. (Score:4, Informative)
After seeing the impressive amount of control you get from moving away from tables and tags to nothing but XHTML and CSS I was ready to make the jump.
The first half of this book won't be anything new to most people, but in the 2nd half of the book I've never seen the box model, div layout, and css explained so clearly. It's made adjusting my web design skills much much easier.
Highly recommended.
Reviewerwho? (Score:3, Interesting)
Choice between WHAT? I think you mean between CSS and tables. Or CSS+XHTML vs. Whatever HTML-like Syntax Works.
But really, there is no need to choose. I use the deprecated b tag all the time, because it is SIMPLE, love to use tables, because they WORK for displaying on various screen sizes, plus (gasp) deploy the font tag from time to time for quick prototypes. And, guess what? I also use CSS. Fact is, Firefox and IE support CSS alongside HTML elements. And so the standards.
I could care less about what is "deprecated" by W3C, as though they are going to come over and scold me, and as though I would care.
Yup. (Score:3, Insightful)
I agree. They can take my <B> tag when they pry it from my cold, dead text editor.
Really... a few nested tables work just FINE. And, if you happen to build e-commerce sites catering to a large cross-section of humanity, you'll find yourself serving
Not a chance. (Score:2)
No. They don't. For you all who don't understand the point of standards and tableless design, let me break it down:
The whole point of design that involves compliant markup and avoids the use of tables is this: it is 100% portable to any device, and to any user. Your PDA or mobile phone (as well as your blind friend's screen reader and your deaf-blind-friend's braille display) need to receive document structure and text only. Then they can present as best fits
Re:Reviewerwho? (Score:2)
I can understand where you are coming from on these types of issues and you can do whatever you want with your own sites, but it would be foolish not to see the other side of that coin as well. The web was built upon standards and would not be nearly as large, widespread, or useful as it is today without these types of agreements. If the web were instead released with propr
Re:Reviewerwho? (Score:2)
The <b> element type is not deprecated.
Re:Reviewerwho? (Score:2)
This page [webpageworkshop.co.uk] says that bold and italic are merely discouraged, but that the underline tag is no longer allowed.
Re:Reviewerwho? (Score:2)
Why are you letting third parties tell you what is and isn't allowed? Just look at the specification [w3.org]. XHTML 1.0 refers to this specification, and XHTML 1.1 is no different.
Re:Reviewerwho? (Score:3, Informative)
The basic hoops you have to jump through:
too much typing (Score:2)
So, just use one of the many tools like Textile, or use a WYSIWYG editor.
Re:too much typing (Score:2)
The b-is-deprecated myth (Score:3, Informative)
http://www.w3.org/TR/xhtml-modularization/abstrac
CSS has to improve (Score:2)
Just having the footer at the bottom of the page, and not just behind the body is (AFAIK) impossible with CSS.
The easiest solution is often to go with fixed size and absolutely positioned divs, but then you reduce the accessibility of the page (
Re:CSS has to improve (Score:2)
Actually, it's really simple. But Internet Explorer doesn't support that bit of CSS. So really, it's Internet Explorer that has to improve, not CSS.
Not true. Here's one technique [themaninblue.com].
Re:CSS has to improve (Score:2)
It's simple... until you have to make it look good. Add a border between the left bar and the body that goes down to the footer, and it becomes trickier. Then add to the mix that you don't want the body to fall below the left bar when it becomes larger than expected (big images or large tables), and it's even harder. Not to mention the problems when you star
This book is not up to the standard of the series (Score:2)
IMO, this book is not even close to the other two. The other two have a nice flow, while this book feels jumpy and cobled together. It's like the other with the fun sidebars and graphics, but just not as well done. I'd like to offer some specifics but the book is on the shelf in my office and I'm home - I just know I wasn't impressed with it like the other two. I literal
Re:The simplest standards compliant webpage EVAR (Score:2)
Re:The simplest standards compliant webpage EVAR (Score:3, Informative)
What version? The simplest HTML 4.01 document can omit the <html> tags entirely. The only required element that doesn't have optional start and end tags is the <title> element. Furthermore, if you don't care about browser compatibility, you can even use shorthand notation to reduce the document to:
The validator chokes on it, but I believe that's a bug in
Re:HTML is passe (Score:4, Insightful)
Re:HTML is passe (Score:3, Insightful)
If you can't "harvest data" from HTML's <h1> tag, you're still not going to be able to harvest data from XHTML's <h1> tag.
Re:HTML is passe (Score:2)
Uhm, doesn't that depend on whether you use strict or transitional?
IMO you're really dumbing down the standard if you're saying that's all it is.
Re:HTML is passe (Score:3, Interesting)
People don't seem to understand the difference between comments and CDATA (think javascript code), almost no-one writes data into the DOM correctly with javascript (document.write() and innerHTML are wrong and makes
Re:HTML is passe (Score:2)
(/s/docutype/doctype)
Re:HTML is passe (Score:2)
Meanwhile, I note that slashdot sends out its pages with <meta
A few days ago, we had a bit of a discussion of the Chinese google. There were a few messages where it would
Alternative to innerHTML? (Score:3)
document.write() and innerHTML are wrong and makes a page no longer xhtml as the content is not written into the DOM.
As far as I can tell, the function of the innerHTML property is to 1. parse the string passed to it as a fragment of HTML or XHTML, 2. convert it to a properly structured subtree for insertion into a DOM, and 3. link it into the DOM under the specified element. If innerHTML is deprecated, then what's the proper way to call the browser's parser to turn a string containing a fragment of XHT
Re:Alternative to innerHTML? (Score:2)
Check out http://script.aculo.us/ [aculo.us] for a javascript class called Builder, works well.
innerHTML isn't deprecated, it's just that it's in a grey area. What you are doing is inserting a character data node into the DOM not element nodes. So accessing the data again shouldn't be possible (although i imagine many browsers will fudge this for you just like the good old days)
Re:Alternative to innerHTML? (Score:2, Informative)
createNode and attachNode just like the old days :)
So what's the accepted DOM function that, given a string of markup, parses the markup to give me one or more nodes that I can attach?
Check out http://script.aculo.us/ [aculo.us] for a javascript class called Builder, works well.
The page you linked does not contain the word "Builder", and neither does the Prototype library linked from there. If it's part of the script.aculo.us library, I'm not in a position to evaluate that library as I write this comment. Be
Re:Alternative to innerHTML? (Score:2)
You can do it with DOM3LS [w3.org], although I don't know if that's the easiest way. I was under the impression that the W3C were going to standardise an innerHTML/innerXML property.
Re:Alternative to innerHTML? (Score:3, Informative)
A string is not a node set. innerHTML just sticks some string in CDATA and plops on the DOM. I'm sure that browsers will try and stick it in the DOM but as you don't have to supple innerHTML a well formatted string, there are no guarantees. document.innerHTML('blah &b <lah> lalala&'); is valid javascript, but it certainly isn't valid XHTML.
Re:Alternative to innerHTML? (Score:2)
No it doesn't. If it did that, there'd be no point in using it. innerHTML takes a string and parses it into a bunch of Nodes, which is then inserted into the document.
That doesn't mean the technique is fundamentally incompatible with XML though. If you supply a string that would result in a malformed document, the browser can throw an excepti
Re:Alternative to innerHTML? (Score:2)
I see innerHTML as lazy, it only takes a few moments to create a proper node set. String manipulation is so 1990.
Re:Alternative to innerHTML? (Score:2)
Re:HTML is passe (Score:5, Informative)
Yeah, right. We've been hearing about how we should all be using XHTML and XML for ages. And yet... the web is still running on HTML 4.01.
Now, I suppose you could blame Internet Explorer for not properly supporting XHTML (it treats it as XML and displays the DOM if you try and do it properly, serving XHTML as "text/html" is wrong and broken). I haven't actually checked to see if the new IE7 supports XHTML properly, but, even if it does, XHTML doesn't really solve anything. It doesn't make data mining any easier. It's just HTML with end tags required.
What's really interesting, IMHO, is CSS3 and XML. You can style XML documents with CSS, which means you could conceivably have a document that describes the contents of the page in a fairly "semantic" manner (I think someone just won Buzzword Bingo here) and then is styled based on CSS for proper display.
You can already do something like that with XSLT, but XSLT has never seemed to really catch on, possibly because it's fairly complicated. With XML and CSS, it uses essentially the exact same semantics that HTML and CSS do (other than having no defaults), and you can apply most of the same styling knowledge from using CSS with HTML to using CSS with XML. The Content Creation section of CSS3 offers some really interesting possibilities.
Of course, without Internet Explorer support, this is basically useless, but it's still something that's fun to play around with, if not practical. But it does mean that we're still going to be using an HTML-based web for the forseeable future.
Re:HTML is passe (Score:4, Informative)
I think that if you look a little closer, you'll find that the web isn't "running on" XHTML or HTML 4.01, but rather a bizarre concoction of tag soup that happens to make popular browsers behave a certain way.
Perhaps according to you, but not according to RFC 2854 [ietf.org], which defines the text/html media type.
It doesn't.
It doesn't so long as it's a minority. When the overwhelming majority of the web uses XHTML, its draconian error handling that it inherits from XML will simplify browsers considerably. This has already happened to a certain extent with the mobile web.
That's completely wrong. Sure, you could make up your own semantics that you associate with the element types you use in your ad-hoc XML format, but nobody else would know about those semantics. That's why you use a common, specified XML format... like... XHTML, where the semantics are understood.
XML isn't a super-format that magically gives you semantics. XML solves the syntax problem and stays well away from the semantics problem. Semantics are addressed at a higher level.
Generic XML has essentially no semantics whatsoever. It certainly doesn't have the same semantics as HTML.
Re:HTML is passe (Score:2)
Actually, they say that the XHTML 1.0 mappings to "tag soup" can be marked as "text/html" but those markings are horrible anyway (and, best of all, invalid HTML 4.01). Calling XHTML "text/html" is still essentially broken. It's supposed to allow XHTML to be viewed with browsers that don't support XHTML, but it essentially removes the only advantage of XHTML - syntax checking.
Re:HTML is passe (Score:3, Informative)
So if the relevant specification says that it's okay, then it's a little disingenuous to state unconditionally that it's wrong then, isn't it?
text/html means whatever the text/html specification says it means. That includes XHTML 1.0 following the compatibility profile.
That is
Re:HTML is passe (Score:2)
You can already do something like that with XSLT, but XSLT has never seemed to really catch on, possibly because it's fairly complicated.
Huh?! I've been working in XSL almost exclusively for several years now. It's used widely, in my experience. It is not particularly complicated, just not the kind of complication you are used to.
Re:HTML is passe (Score:3, Interesting)
And that's a myth.
I run a website. Sections of it rely on CSS2 and don't work in IE. Instead of writing a workaround, I redirect IE users to a page that explains the problem in a few words, and gives them a link to try and look at the page anyways (this is mostly for Opera users identifying as IE).
Despite all the faked statistics claiming IE has a market share of 90%, the browser distribution on my site clearly favors Firefox (which I l
Re:HTML is passe (Score:2)
I dunno, stuff like <verse>, <title>, and perhaps most useful, <author> - keep in mind we're talking about computerized semantics, not human readability.
The "semantic web" already runs mostly on magic - theoretically, people mark up sections of their document as having certain meanings (like an author) and then the "semantic browser" picks up on those. In this case, it might pick up on the author and allow searching for other stuff by the same author. Realistically, who is going to bot
Re:HTML is passe (Score:2)
That was kinda my point originally, XHTML isn't going to replace HTML because XHTML offers nothing. (It certainly doesn't offer any form of semantic markup.)
What's interesting is more of creating your own "markup language" and using CSS to explain to the browser how it looks like. It's not really that much more helpful to the computer, but it can make the actual markup easier to read. So instead of having a page full of <div class="comment">, you can have <comment>, making the markup more u
Re:HTML is passe (Score:2)
Not well enough, no (IMNSHO of course). I might want to be able to search only for things where Philip Larkin is identified as the author rather than getting pages about Philip Larkin. I might want to be able to retrieve a poem by searching for a line contained within a poem and only get back pages containing the poem rather than discussion of the poem. It's b
Re:I still don't like CSS standards (Score:3, Insightful)
In reality, FF has way better adherence to CSS standards than IE does. IE is crap. Intentionally broken crap. 5 years outdated, full of holes crap.
Re:I still don't like CSS standards (Score:2, Informative)
Re:I still don't like CSS standards (Score:2)
It can't possibly test for everything and it doesn't.
It's a nice reference point, but that's all it is, a reference.
Re:I still don't like CSS standards (Score:2)
I'm not sure placement of the remainder is layed out in the standard, but I may be wrong.
Oh, and you should build for Mozilla and then fix IE, it's hella easier to do it that way than the other way aro
Re:I still don't like CSS standards (Score:2)
The other big difference is IE's box model deciding to expand elements that have padding and width defined. People who code just for IE always complain that everyone else renders it wrong when they run into this.
It's a JOKE, you silly people! (Score:2)
Re:I still don't like CSS standards (Score:2)
So this:
Re:I still don't like CSS standards (Score:2)
That code will give you height and width dimensions of 130px in a standards-compliant browser, not 115.
Re:I still don't like CSS standards (Score:2)
That problem was fixed when Microsoft released Internet Explorer 6.0 in 2001. Keep up. If you're still experiencing that problem, then it's because you are kicking Internet Explorer into "quirks mode".
Re:I still don't like CSS standards (Score:2)
I just meant that if the person who was complaining about this was consistently having problems with IE and Firefox/Opera not displaying things the same way, it was probably the box model issue. And yeah, it'd have to be kicked into quirks mode for that to happen. Then again, I bet there are plenty of people working on web sites out there who don't even know what quirks mode is, let alone how to avoid falling in to it.
Thanks for the correction, that is an impo
Re:Head First doesn't cut it (Score:3, Interesting)
Re:if (HTML_can_be_found_online) {then = save_ur_$ (Score:3, Insightful)
Re:if (HTML_can_be_found_online) {then = save_ur_$ (Score:2)
Re:if (HTML_can_be_found_online) {then = save_ur_$ (Score:2)
I thought the book was one of the most successful teaching tools I've read in years. There's a world of difference between Googling for bits of reference material, and reading a 400-page narrative built by people who know how to teach.
Reading reference material is not learning.