Building BobSmithPhotography.net has stopped expanding because I've been overwhelmed with spam on the comment forums. So, if you're here and have questions about web design come and visit Forums, Blogs, Wikis dot com. It has articles that I've written, some of which are also here, and a web design forum as well so you can ask any questions you may have. There is still a lot of good stuff here though, so poke around the links and take a look.

Home » HTML Tags » span

span

A span allows you to separate a section of text from the text around it.  By default a span should not be visible to the reader unless you change the CSS that applies to it.

<p>This is a <span>sample span</span> of text.</p>

The code above will look the same throughout unless the span has styling applied to it.  For example, if we have the following CSS code then the fonts will be different.

p {
color: black;
}
span {
color: red;
}

The example above will be mostly black with the span in red.  This is currently the "correct" way to handle font changes rather than using the <font> tag. 

Content managed by the Etomite Content Management System.