scriptygoddess

10 May, 2002

Divs and Spans

Posted by: Christine In: How to's

It should be known that I am fairly new at the CSS thing – I learned just enough last fall to use it to skin my site, but beyond that I still don't know that much. Just this morning I asked the other scriptygoddesses what the difference between the ‹div› and the ‹span› tags were in CSS. Lynda & Kristine wrote great responses that were clear to me, but I wanted to also point out that scottandrew.com has a nice explanation. In case you were wondering, "DIV and P are block-level elements, meaning they are designed to contain other elements. By default, DIV and P elements begin on a new line. SPAN, on the other hand, is an inline element."

Related posts:

  1. Adding a block of HTML to a WordPress post One problem with the WYSIWYG editor in WordPress is that...

Related posts brought to you by Yet Another Related Posts Plugin.

5 Responses to "Divs and Spans"

1 | beverly

May 14th, 2004 at 1:40 pm

Avatar

Tarsh, your revision should read: "fairly knew at" should be "fairly new at." Fairly is an adverb and by that grammatical position, as well as by definition, cannot be used interchangeably with fair.

2 | nheo

May 17th, 2002 at 9:58 am

Avatar

I didn't know that myself.

3 | Christine

May 10th, 2002 at 6:28 pm

Avatar

Oops! That's what happens when I write posts and talk on the phone at the same time!

4 | Tarsh Fletcher

May 10th, 2002 at 6:26 pm

Avatar

"fairly knew at" should be "fair new at" – sorry to nit pick, thought you might want to know.

5 | kristine

May 10th, 2002 at 6:26 pm

Avatar

Oh man, and I was getting so excited about the prosepect of writing a post on this topic :giggle: That's a good article about it, though :)

MaKo's Div and Span page has a bit more info.

The nice thing about div and span over other elements (IMO) is that they have no properties of their own. P is a block level tag, but it has margins that are preterminded. So when you start defining things for span and div, they are blank slates for the defining!

Cool, huh?! :)

Featured Sponsors


  • jerey: how do i rewrite this because it tried RewriteEngine on #Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL
  • Jennifer: So I was testing this out to see if maybe something changed in the latest version - I had a test wordpress setup - and just dumped the mycomment funct
  • KDesign: Hi, thanks for the tutorial. I'm having problems though that I can't seem to find an answer to on the web. When I follow the example in the Codex h

About


Advertisements