You are here: Re: <DIV> « HTML « IT news, forums, messages
Re: <DIV>

Posted by Ed Seedhouse on 05/23/07 01:17

On 22 May 2007 08:44:04 -0700, Ciaran <cronoklee@hotmail.com> wrote:

>On May 22, 12:16 am, Brian Robertson <brianrobertson@[nospam].com>
>wrote:
>> Can anyone explain to me what the <DIV> tag does? Keep it simple, folks.
>> I have read several explanations in books and they have all gone right
>> over my head.
>>
>> Brian.
>
>Brian, div and span tags are basically containers to put content into.

Well no, for most content other preferable tags exist, like <P> and
<H1>--H6> and <UL>. DIV tags are meant for grouping block elements into
logical divisions of the document, and SPANS are there, if I recall
right, to create CSS hooks into short sections of text for various
effects, though it's usefulness in general is questionable, I think.

Using all DIVs in place of semantically appropriate titles is just as
bad as using tables for layout. It even has a name you can google for :
"divitis"

>You can attach styles to these tags which will effect everything
>inside the tags. The main difference between div and span tags is that
>by default, div tags display in a block whereas span tags display
>inline with whatever else is around them. ie When you put something
>into a div, it's automatically displayed on a line on its own. When
>you put something into a span, it does not effect the layout until you
>begin to add styles.
>
>Hope that helps,
>Ciarán

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация