Not at least with HTML 4 and XHTML. HTML didn't harbour presentation information. It told the browser the structure of the document.
If you look at other document writing system such as LaTeX. You will see that there are Sections, SubSections etc.
The link to the CSS simply told the browser how these should be presented. LaTeX has something similar as you can create a document class and Word has different styles you can import.
Having a concept of a document structure with a set of styles attached which you can change easily is a good idea.
The HTML document should make sense without a style sheet and if you write/generate semantic markup it does work properly.
> Not at least with HTML 4 and XHTML. HTML didn't harbour presentation information. It told the browser the structure of the document.
I disagree. Unlike JSON which is truly presentation agnostic, the position of the HTML elements always did affect the layout and some designs were pretty much impossible to achieve without having to move HTML elements around. Despite the popular claim to the contrary, HTML was always part of the presentation layer.
> position of the HTML elements always did affect the layout and some designs were pretty much impossible to achieve without having to move HTML elements around
The results you see on CSS Zen Garden show that this is not true at all. It was hard, but not impossible then and nowadays grid layout and CSS3 fixed a lot of the issues.
Have you deliberately ignored the rest of the sentence? CSS3 and display grid solved a lot of the issues. It is supported by any modern browser.
Leveraging grid layout makes for a complete separation of concerns and still keep semantic markup without any hacks that only add to the amount of work. Take just a couple of hours of your very important time to learn it, and you might see the payoff.
To achieve that tho you need a ton of superfluous non-semantic html wrapping everything in triple so that you have the flexibility to do what you need.
Again, not true. Take a look at the HTML from the Zen Garden page and you will see it is very semantic.
Also, just anecdotal: I am working on a Vue.js component which I want people to customize the styling however they want. This is forcing me to drop the CSS part of the components. I am not adding any cruft HTML and yet I did manage to get a "basic" theme and a good chunk of the "materialize" look already. Two themes, two separate SASS projects. It can be done.
The main (only?) way html affects style is containment - the hierarchical nature of it and the ability for components to be "inside" other components. I feel like I already bump into this issue quite often with something as basic as whether an <input> should be inside the <label> or next to it. The only way, I believe, to resolve containment issues is with absolute positioning (right?). Given enough time and change requests, every element will eventually have to become absolutely positioned, which would become a mess - do you agree with this and how do you handle it?
I am not a frontend specialist, but "display:grid" solved a lot of these issues for me. You can define even template areas and make things responsive with align-self, justify-self and related directives.
At the time CSS wasn't as feature rich as it was today. The problem was a lot of the time the designs didn't respect the medium at all. There were even designs that were impossible. The technology was being pushed to do stuff it wasn't really supposed to do.
You are complaining about the wrong thing.
> Despite the popular claim to the contrary, HTML was always part of the presentation layer.
Not at all. It is document format. Designs that do not respect that doesn't change it's intrinsic nature.
This is like complaining that a shoe isn't a very good mallet.
Apart from the false dichotomy (the fact that HTML is a document format and that its structure plays an important role in browser layout are both true), I totally agree with you. HTML was indeed never meant for that but it was often sold as such by evangelists, hence the last remark (I wasn't complaining about HTML).
That's not entirely true. Even ignoring the elements that were explicitly about formatting and have since been deprecated, the order and nesting of elements could have a profound effect.
For example, the entire model for how to do layout using CSS floats fundamentally depended on the order of elements in the source HTML document. It wasn't until much later that CSS finally added tools like flexbox and grid where you could explicitly reorder the content from multiple source elements in the rendered output using CSS alone.
Even today, certain effects such as column-based formatting for a table are much easier to specify in CSS if your HTML has additional elements such as <colgroup> included, yet there is little reason to include such elements in the markup except to support that kind of formatting.
What you are talking about is the still part of the document and the document structure. Generally where writing something you will have a beginning, a middle and and end of a document. You will have parts of a document that will have lists, tables etc. These are structural elements. You can look at the markup itself (if done semantically) and you will be able to ascertain its meaning.
Yes a table will need to have the correct elements in the right order. This isn’t presentational it is semantic.
HTML5 does this better than HTML 4 as it has more semantic elements as a response to the more complicated layouts of modern web pages.
If you look at other document writing system such as LaTeX. You will see that there are Sections, SubSections etc.
The link to the CSS simply told the browser how these should be presented. LaTeX has something similar as you can create a document class and Word has different styles you can import.
Having a concept of a document structure with a set of styles attached which you can change easily is a good idea.
The HTML document should make sense without a style sheet and if you write/generate semantic markup it does work properly.