Hacker News new | ask | show | jobs
by bphogan 3731 days ago
HTML is not the presentation.

HTML is the content and description of content. You put a <strong> tag around text to make it strong emphasis.

CSS is the presentation. Your browser sees the <strong> tag and applies its default style of making it bold.

1 comments

They're both the presentation. Showing emphasis and structuring content is as much part of the presentation as CSS, maybe even more so if you care about backwards compatibility and graceful degradation.

This is just incredibly pedantic. For all practical purposes HTML + CSS is the presentation. Toss JavaScript into that if you want. Front-end work is the presentation.

It's not pedantic. It's the way it was designed. Just because people use tables for layout doesn't mean they were intended for that.

As far as graceful degradation, If I open a properly built page in a text-only browser, there are no styles. There's no real emphasis or bolding. There's just text. Because CSS didn't exist.

Now, if you want to live in the early part of the decade when it was OK to put inline styles and background colors in your HTML, that's fine. But the world evolved beyond that. HTML with <body bgcolor" is deprecated.

Because HTML is the content. CSS is how it looks. And JS is how it works.