This is a total newbie question, so thanks in advance. I’m trying to get my head around the difference between divs and spans, and when and how to use them.
Say for instance, I want to have an image left justified, and I want the text to flow around the image on the right, while maintaining justification. If the text flows past the image, I want it to wrap around the bottom of the image…same as what we call in the layout world, ‘wrap’.
I’m looking for an example to reference, so in your answer can you provide an example of the mark up?
Huge Thanks!!!
A SPAN tag is not intended to be a container for other tags. This is especially useful when combined with classes.
Use divs for defining sections of a page, and spans to enclose and style text or classes of text.
http://www.learnwebdesignonline.com/htmlcourse/span-div.htm shows a good example of how they are used. For your example of wrapping text, float the image and wrap it all in a DIV – like so: