4 ms·
The arguments presented seem like a half truth to me. 1 HTML multiple CSS not 1 CSS multiple HTML The whole concept should be that HTML should be written to h
by iroboto 18y ago
The arguments presented seem like a half truth to me.
1 HTML multiple CSS
not 1 CSS multiple HTML
The whole concept should be that HTML should be written to have 100% accessibility across all readers (browsers and mobile devices), meaning someone with the most ancient browser can read the page and understand the content of everything without any form of presentation.
What the author has done essentially is the following:
Try reversing some words in a sentence and then later complain that English is flawed because the sentence no longer makes sense reading it left to right.
The HTML won't make any sense if you start reversing it... I mean what is the point of putting <h2> tags below your <p> when it's obvious that the <h2> tag is acting as the heading for the <p> below. I wouldn't be able to read that, so why is CSS @ fault?
The logical flow of the content should be based upon the reading the raw HTML in a procedural order.
This will keep it simple for coders to update the content, and css artists can pump many different layouts and show many different layouts to clients in a matter of seconds.
Good CSS also requires good HTML.
Why the author of the article is using a div container to wrap them all when a body tag exists is beyond me.
I think as much as we point our fingers at css as a flawed language, we need to point our fingers at how write our HTML as well.
www.csszengarden.com
- chairface 18y ago> I mean what is the point of putting <h2> tags below your <p> when it's obvious that the <h2> tag is acting as the heading for the <p> below. I wouldn't be able to read that, so why is CSS @ fault? Nobody is talking about putting headers after the content they're introducing. The author is talking about a situation where it makes sense to order the markup one way, but CSS demands it to be done a different, not easily readable way. Which does happen sometimes. > Why the author of the article is using a div container to wrap them all when a body tag exists is beyond me. This looks like a ridiculous statement to me. But please, explain further what you want him to do. I find it comical that you go on about "good HTML" and then point to CSS Zen Garden, where the HTML is inextricably bound up with the presentation (ie, adding wrapper elements to allow for flexibility in styling). CSS Zen Garden is an example of HTML as it should not have to be.
- iroboto 18y agoCSS doesn't demand it to be done differently though. If the HTML is written with a different flow the CSS will need to be written to accompany that. I won't say it's perfect, but if you wrote div col 1 div col 2 and then you wanted col 2 to be on the left of col 1, you'd write the css differently then you would the forward method. >This looks like a ridiculous statement to me. But please, explain further what you want him to do. Well look at it this way <html><body><div container><stuff><div container></body></html> What is it that div container is doing so well that body isn't already doing as a binding tag? > I find it comical that you go on about "good HTML" and then point to CSS Zen Garden. I will have to disagree. CSS Zen Garden reads perfectly and logically without css. It's something that 90% of sites are missing out there. And although the HTML is inextricably bound up with the presentation as you write, it is 100% readable by Netscape 1.0. He uses HTML to describe the data that is being wrapped in the tags, and the information that is grouped by divs are grouped by the fact that the content is related, not by the fact that the data should be visually sitting beside each other. While there is excessive usage of <span> tags written throughout, it was a design decision to enable css artists to replace text with images, or allow them to get around browser quirks that are challenges that CSS still face today.
- chairface 18y ago> and then you wanted col 2 to be on the left of col 1, you'd write the css differently then you would the forward method. At the cost of a lot of flexibility. Most people, when faced with a change in design like this, simply reorder their HTML. So perhaps "demand" was hyperbole, but CSS does still push developers to rewrite their HTML when design changes happen. > Well look at it this way <html><body><div container><stuff><div container></body></html> The container is providing a hook for layout information that the body tag cannot. For instance, if I wanted the body background color to be blue and the container's background to be white. Also, if you want your content to be restricted in width, it's a lot easier to wrap it with a div than deal with the lack of the > operator in IE 6. > CSS Zen Garden reads perfectly and logically without css. I didn't say that it's hard to read. I said that by the standards community's definition it is not good HTML, because it mixes content and presentation. Just to be clear, I think that "bad HTML" is pretty much the only practical way to go right now. So, I don't have a problem with the way CSS Zen Garden uses wrappers, nor do I have a problem with the wrappers in this blog post. But you are criticizing one and making excuses for the other.