/    Sign up×
Community /Pin to ProfileBookmark

DIV and SPAN

I’m a newbie to CSS and am trying to learn how to efficiently use CSS. I was wondering when and how you use DIV and SPAN as it seems that they are used quite abit.

Thanks.

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@VladdyMar 17.2004 — Ideally you do not use them at all... see my rant for more info:

http://forums.webdeveloper.com/showthread.php?s=&threadid=30383
Copy linkTweet thisAlerts:
@ray326Mar 17.2004 — While I agree with Vladdy, the world ain't ideal so...

<div> is a generic block level element

<span> is a generic inline element

They are used for grouping, generally to apply certain styles to the things they contain.
×

Success!

Help @Draike spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...