|Join Nairaland / LOGIN! / Trending / Recent / New|
Stats: 1,846,393 members, 3,677,529 topics. Date: Sunday, 23 July 2017 at 11:41 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.
How Do I Correct This: Webmasters Come To My Aid / I Launched A New Blog- Please Take A Look And Tell Me What You Think / Develop A Custom Mobile App For Your Business, Products & Services In One Week
|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 - 2017 Oluwaseun Osewa. All rights reserved. See How To Advertise. 36