Added for You
#1 in Business Subscribe Email Print

You are here: Home > Internet and Businesses Online > Web Development > XHTML Basics - DIV or SPAN? DIV vs SPAN

Tags

  • content
  • sections
  • economist
  • within these
  • allow localised
  • within these

  • Links

  • Medical Claims Software
  • How to Start Your Own Small Business
  • Beware of Mortgage Refinancing Traps
  • Added for You - XHTML Basics - DIV or SPAN? DIV vs SPAN

    Submit Your Articles: Guidelines for Getting the Most out of Article Syndication
    The prevailing, generic internet marketing advice in vogue right now is that you need to syndicate your content. In other words, submit your articles to content directories and syndication hubs in order to win ne
    ly useful when combined with classes. It has even been suggested that future semantic web models will use such markup to define relevant content.

    For example by defining a class telephone, when can ensure all telephone numbers are displayed in

    Questions You Need to Ask When Bidding on Cleaning a Building
    When bidding on cleaning a building, walking through the building with the prospective client is an important part of the process. This offers you not only a chance to do a detailed site inspection, but to ask que
    These two tags are often used inter-changeably by developers for different reasons, so what are the differences between them? How should they be used to markup web pages?

    The basic difference between the two is their default behaviour. DIV tags are block-level tags and can be used as containers for other tags. SPAN tags are inline tags and should only contain content. These default behaviours can of course be altered by CSS definitions, but are default in any browser context.

    As a reference, if you want to align text within these tags use the following CSS attributes;

    DIV - text-align: left|right|center|justify

    SPAN - float: left|right

    DIV tags are also used to define logical divisions of page content. It also allows CSS to be defined for whole sections of HTML. By applying an id to a DIV you can also add controls using JavaScript.

    A SPAN tag is not intended to container other tags, but rather to allow localised styling. This is especially useful when combined with classes. It has even been suggested that future semantic web models will use such markup to define relevant content.

    For example by defining a class telephone, when can ensure all telephone numbers are displayed in

    Web Site Design Basics - The New Forrester Research Report
    According to a new report released by the Forrester Research Group (and reported in Wall Street Journal on June 12, 2007), here are the biggest problems today in web site design...1) Navigation – as
    are block-level tags and can be used as containers for other tags. SPAN tags are inline tags and should only contain content. These default behaviours can of course be altered by CSS definitions, but are default in any browser context.

    As a reference, if you want to align text within these tags use the following CSS attributes;

    DIV - text-align: left|right|center|justify

    SPAN - float: left|right

    DIV tags are also used to define logical divisions of page content. It also allows CSS to be defined for whole sections of HTML. By applying an id to a DIV you can also add controls using JavaScript.

    A SPAN tag is not intended to container other tags, but rather to allow localised styling. This is especially useful when combined with classes. It has even been suggested that future semantic web models will use such markup to define relevant content.

    For example by defining a class telephone, when can ensure all telephone numbers are displayed in

    How To Market Your Adsense Blog For Traffic
    There are several ways to market your Adsense blog for traffic. Cast aside the notion that search engines are the only source of traffic. There are many successful online entrepreneurs who do not bother with searc
    ference, if you want to align text within these tags use the following CSS attributes;

    DIV - text-align: left|right|center|justify

    SPAN - float: left|right

    DIV tags are also used to define logical divisions of page content. It also allows CSS to be defined for whole sections of HTML. By applying an id to a DIV you can also add controls using JavaScript.

    A SPAN tag is not intended to container other tags, but rather to allow localised styling. This is especially useful when combined with classes. It has even been suggested that future semantic web models will use such markup to define relevant content.

    For example by defining a class telephone, when can ensure all telephone numbers are displayed in

    How To Avoid Being Cheated By Your SEO Company
    Search engine optimization (SEO) can be a time consuming and tiresome task, even for the experienced guru. Outsourcing this to a company is a good thing and will save you a lot of time and problems. However what y
    ent. It also allows CSS to be defined for whole sections of HTML. By applying an id to a DIV you can also add controls using JavaScript.

    A SPAN tag is not intended to container other tags, but rather to allow localised styling. This is especially useful when combined with classes. It has even been suggested that future semantic web models will use such markup to define relevant content.

    For example by defining a class telephone, when can ensure all telephone numbers are displayed in

    Banks Are Ready To Outsource Their Tasks To Low Paid Destinations Like India
    Banks are ready to outsource their tasks to low paid destinations like India.As outsourcing being concern the economist has their own way of thinking. Here's The New Economist, with a London perspective tha
    ly useful when combined with classes. It has even been suggested that future semantic web models will use such markup to define relevant content.

    For example by defining a class telephone, when can ensure all telephone numbers are displayed in the same fashion:

    44-20-555-4444

    SPAN tags have similar properties but should be used to reference inline content and apply style by classes.

    In summary: use divs for defining sections of a page, and spans to enclose and style text or classes of text.

    Permission is granted for reproduction of this article, so long as it is published in its entirety, with footnotes attached.

    HTTP = HTML link (for blogs, profiles,phorums):
    <a href="http://www.added4u.com/article/86400/added4u-XHTML-Basics--DIV-or-SPAN-DIV-vs-SPAN.html">XHTML Basics - DIV or SPAN? DIV vs SPAN</a>

    BB link (for phorums):
    [url=http://www.added4u.com/article/86400/added4u-XHTML-Basics--DIV-or-SPAN-DIV-vs-SPAN.html]XHTML Basics - DIV or SPAN? DIV vs SPAN[/url]

    Related Articles:

    Over-Delivering Techniques

    Marketing Specialized Drought Equipment to Carwashes; Case Study

    Merchants at the Wrong End of Payment Fraud

    Bookmark it: del.icio.us digg.com reddit.com netvouz.com google.com yahoo.com technorati.com furl.net bloglines.com socialdust.com ma.gnolia.com newsvine.com slashdot.org simpy.com shadows.com blinklist.com