Hacker News new | past | comments | ask | show | jobs | submit login

Funny, I thought HTML was a markup language. The article says HTML is (or can be) both source code and object code. I say it's neither. HTML isn't the source code for some application or piece of software, and it's not the application or software itself. It doesn't tell a cpu what to do, it tells a browser what to show.



Yes, of course. But it was clearly meant as an analogy.

The elements of good coding style that apply when writing a program in C don't necessarily apply to a compiler when it compiles a higher level language down to C.

Similarly, the best practices for writing HTML by hand don't necessarily apply to a program that generates HTML from a higher level abstraction.


By then end of the article, I was convinced the "source code vs. object code" wasn't an analogy, but a sincere claim.


I think one of the problems with seeing "HTML as object-code" is that it leads to lousy markup. Headers implemented with font elements and explicit line breaks. horizontal margins with blockquote elements. That approach makes sense when HTML is seen as plain object code that drives a browser to lay thing out a certain way.

It does not make sense when one of the most important readers of your site is effectively blind: Googlebot.

I've used both approaches, good semantic markup and sloppy made-for-IE. Choosing good semantic markup has never come back to bite me in the ass. Sloppy markup has gone two ways, more often been a time saver and soon thrown away, but sometimes come back as a horrible thing to maintain and extend.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: