Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Is it a good sign if your website looks like a plaintext file with hyperlinks when the stylesheet is disabled?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

It's a positive sign, yes. What you've done is separate content from presentation, and from what you've described CSS is doing it's job exactly as intended -which is styling the content.

In the long run all you need to do is update or change the CSS in the event of a redesign. Your content will stay consistent throughout as you've kept it in the HTML.

share|improve this answer
1  
"In the long run all you need to do is update or change the CSS in the event of a redesign." Uh, really? Other than some marginal edge cases, seems to me HTML/CSS is designed in a way that the CSS design is always bound to the positioning and hierarchy structure of the elements in HTML. Not to mention that new designs can require alterations to the content itself (e.g. titles where none were before). The separation is a nice concept, and CSS does make altering design a lot easier, but in order to truly separate content from design, you'd probably need some XML/XSLT type of setup. –  Ilari Kajaste Jan 12 '11 at 16:02
    
Yes, really. If the HTML is well constructed then you can rewrite the CSS to show a different design. Obviously this is an assumption that any redesign would be sympathetic to the existing content in the HTML. If the design isn't, then of course the HTML would need to change. I think using XML/XSL to deliver direct to a browser is more of an edge case to be honest. If you need proof that separation of HTML and CSS can work for multiple designs, please take a look at a very old site csszengarden.com. –  Demwunz Jan 15 '11 at 20:35
add comment

This question seems simple but we can take it in a wider sense.

Quick answer is yes, your formatting should rely only in CSS, and without it your page should look a plain text with links.

More or less. Because HTML elements also have their indeed formatting and rules. Tables, quotations, lists, fieldsets, inputs, headings... All those elements usually renders a little different, even in a plain text context. Composing good html is the basis for a lot a things, like SEO, and can help avoiding some dummy markups, like

<p class="code">

or

<div id="table">

Of course, the simplicity to maintenance, keeping all CSS in one or two files are the real great point on using CSS.

Last comment is: don't forget images. img tag exists to be used. Sprite technique is indeed efficient, but should not replace the content images. A quick example: an image gallery.

Menu icons and other graphic elements that aren't content can and should be placed within sprites. But the images, the real content, should be placed as img tags, with all resources (alt, title, caption when inside a figure element...).

share|improve this answer
add comment

Yes, this is the best thing. It gives you the flexibility to apply another style on the page without affecting the content.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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