Quantcast
Channel: In a perfect world, all the graphics and layout are defined in stylesheets - but not src? Shouldn't be? - Stack Overflow
Viewing all articles
Browse latest Browse all 7

In a perfect world, all the graphics and layout are defined in stylesheets - but not src? Shouldn't be?

$
0
0

The purpose of CSS is to help web developers to define and apply graphics and layout, separated from the actual content.

However, it seems like CSS can tweak pretty much anything (graphics wise) on a website - apart from the source attribute of an <img>-tag.

To achieve 100% separation between style and content (which we all want, right?) shouldn't we define image sources in the CSS as well?

I know that CSS can't do this (no support of changing src-attribute for images) but there are work-arounds, such as using <div> with backgrounds instead of <img>. However, by doing that, won't it break search engines?

My question is. Is using instead of <img> to achive 100% separation between style and content a reasonable action?


Viewing all articles
Browse latest Browse all 7

Latest Images

Trending Articles





Latest Images