2

I'm trying to super simplify all my forms, input fields etc.

Using absolute minimum of HTML markup, and then use CSS to make it look good and well-formatted, with pseudo block elements and so on

If I disable stylesheets in browser then visually it's a mess (many elements appear inline etc.)

But semantically and SEO-wise it is good. And with proper descriptions etc.

My question is:

Should a website look OK (presentable / formatted) with stylesheets disabled?

Why/not? Who has stylesheets disabled?

  • Hi @mowgli - I really don't see why anyone would be disabling CSS when browsing other than maybe scraping for HTML source code or something "poweruser-ish" like that. Disabling JavaScript sure, but as long as you keep your CSS lightweight and minified so that loads good even on slow connected mobile devices, I think you will be fine. – McKnight Nov 28 '14 at 10:33
  • Depends, what is the purpose of the site? Governmental? Public appearance? Directed towards a specific audience? Web based application? – Ayyash Nov 28 '14 at 10:38
  • I guess I have old habits/rules when it comes to css-less markup (first make it look decent, then make it look awesome with CSS). @Ayyash It's a somewhat plain/oldschool multi-user website with forums and user-to-user "ads". Nothing huge, but popular in my country for the topic. – mowgli Nov 28 '14 at 11:23
3

Well formatted markup will not necessarily present information in the order that a person would expect it. For years I've placed the navigation at the bottom and the primary text at the top (within the HTML) and used CSS to place the nav where I wanted to. SEO people I talk to still consider that to be a good practice.

I think that looking at your page w/o CSS is a good way to quickly evaluate your markup but I can't think of a practical use case to spend time on making the page appear well without markup.

1

Generally speaking if you are coding semantically your unstyled page will be clear. Browsers apply default properties to elements like h1, p, legend etc.

Pseudo elements (:before and :after content) is usually not desirable for accessibility - think screen readers.

Unless you have a specific use case for unstyled content then you can safely ignore it along with IE6 and (erghmm IE).

1

The W3C answer to this is a strong "yes". They consistently advocate separation of semantic and presentation concerns, and if that is done rigorously, then unstyled HTML should make visual sense, because the default behaviors for paragraphs, definition lists, captions etc. are designed to make visual sense. The point is not so much that people will have stylesheets turned off (except when we're talking about accessibility); it's that this will work as a side effect of coding "correctly", and so can be used as test of markup quality.

But that answer is so unrealistic it's nearly worthless. Almost no one uses purely semantic tags like dl, cite or colgroup, let alone the newer HTML5 tags; and even simple text pages can't always be structured perfectly with just div, table and ul.

Still, it's not a bad idea to be aware of how your page looks without CSS. In particular, if the order of elements is scrambled, that's a sign that your markup is a mess, which can make code harder to maintain and debug. And if you are making a list or a table, there's no reason not to use the right markup.

  • This is where I'm coming from. I think I just have to balance it.. not putting too much attention to unstyled appearance, but keep the semantic order etc. correct – mowgli Nov 28 '14 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.