Tags Just for CSS

Before CSS, all tags had some kind of default styling. See the default margin that we have above and below these paragraph tags?

By default, the body used a serif font. Links were underlined and blue if unvisited and purple once visited. A long time ago in in a galaxy far away, the default body background color was gray/grey. And we have video proof as well.

With CSS we wanted some tags that had no pre-existing style. So the span tag was invented as the new "inline" tag with no styling.

And the div tag is a new unstyled block tag with no padding, margin, background-color, or anything else. So you could mark blocks with the div tag and not inherit any default style.
And the div tags can be nested as well. Adding the 1 pixel borders does take up a pixel of space.
You can add some text in the outer div.
Wow - there really is no margin or padding on an unstyled div tag.

Lets move on to ⇒ more ways to select text to style . And go back to using a p tag so we get a little white space between paragraphs.

Go back to the Starting page.