Nairaland Forum

Welcome, Guest: Join Nairaland / Login / Trending / Recent / New
Stats: 1208753 members, 1561525 topics. Date: Wednesday, 23 July 2014 at 03:28 PM

Importance Of Div Tags - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Importance Of Div Tags (275 Views)

Someone Help There,wat's D Fn Of Div & Frameset / How To Do Vertical Alignment With Div-based Layouts / How To Insert Emoticons & Html Tags In A Webpage (1) (2) (3) (4)

(0) (Reply)

Importance Of Div Tags by winexviv: 7:07am On Dec 27, 2012
Well basically the div tag says "do whatever other instructions are contained in the div tag until you see a </div> tag. div is only really useful in conjunction with another instruction.

for example <div align'"center">

aligns everything on center until there is a

</div>

The div tag is used to designate a block-line portion of an HTML document as a div element and to apply any of the core attributes of this tag against the contents of that element. The behavior of this tag is block-line, because this tag causes a line break (the equivalent of a br tag) to occur both before and after the div element. div tags, which can be nested, allow a significant degree of control and manipulation of each individual block section of your web page.

For example, you could use the class or style core attributes to apply the effects of Cascading Style Sheets, or you could use the lang attribute to display a foreign language text, or you could assign an id to each block of code for reference by a hyperlink.

In contrast, you should use the span tag when you want to apply attributes to an inline portion of a page. Note that the behavior of the span tag is not block-line, but rather inline, since the effects occur in the normal flow of the text and images (without the tag inserting any additional line-feeds or carriage returns).

With the advent of Cascading Style Sheets, both the div and span tags have gained importance and usefulness. The issue of cross-browser or mobile compatibility is being over rulled.
Re: Importance Of Div Tags by jamessmit(m): 9:42am On Dec 27, 2012
DIV Tag:
- Generally, It is supported in all major web browsers.
- It defines a division or a section in an HTML document.
- It is used to group block-elements to format them with CSS.
Re: Importance Of Div Tags by winexviv: 11:16am On Dec 27, 2012
james_smit: DIV Tag:
- Generally, It is supported in all major web browsers.
- It defines a division or a section in an HTML document.
- It is used to group block-elements to format them with CSS.
Nice one.

(0) (Reply)

Web Hosting For Newbies Starting From 2,500 Only. / Free Unlimited Web Hosting / Which Bulksms Offers Pesonalize Message

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (0) (1) (2) (3) (4) (5) (6) (7) (8) (9)

Nairaland - Copyright © 2005 - 2014 Oluwaseun Osewa. All rights reserved. See Nairalist and How To Advertise. 23
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.