|Join Nairaland / LOGIN! / Trending / Recent / New|
Stats: 1,947,420 members, 4,037,100 topics. Date: Saturday, 20 January 2018 at 02:01 PM
|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
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|
- 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:Nice one.
|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
Nairaland - Copyright © 2005 - 2018 Oluwaseun Osewa. All rights reserved. See How To Advertise. 35