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."

5 Responses to "Divs and Spans"

1 | 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?! :)

2 | 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.

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 | nheo

May 17th, 2002 at 9:58 am

Avatar

I didn't know that myself.

5 | 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.

Featured Sponsors

Genesis Framework for WordPress

Advertise Here


  • Scott: Just moved changed the site URL as WP's installed in a subfolder. Cookie clearance worked for me. Thanks!
  • Stephen Lareau: Hi great blog thanks. Just thought I would add that it helps to put target = like this:1-800-555-1212 and
  • Cord Blomquist: Jennifer, you may want to check out tp2wp.com, a new service my company just launched that converts TypePad and Movable Type export files into WordPre

About


Advertisements