Blog

SEARCH

About US

Hooked Web Design is the online home of Nabil Sayagh, a creative freelance web designer and web developer based in Long Island New York. As a web designer, I am passionate about web design and website development, branding and advertising material, and i thrive on designing simple, clean attractive websites that fully comply with today’s XHTML web standards for my clients. My team and i are located all over Long Island, New York, and our primary expertise is in front end web design; XHTML, CSS, Web Design Standards, Javascript, and over all user experience.

What are we up to?

Powered by Twitter Tools

XHTML STRICT vs XHTML TRANSITIONAL

Posted in: Blog, Web Design by admin on June 24, 2009

XHTML is a number of document types that reproduce, branch, and broaden HTML4. It is designed to work in conjunction with XML-based user agents. Most often times XHTML is viewed as a stricter version of HTML.

The major difference between XHTML and HTML4 reside in:

  • 1) All documents must be well formed.
  • <p>This day is <em>nice</em></p> GOOD.
    <p>This day is <em>nice</p></em> BAD.

  • 2) Elements and Attributes must be in lowercase:
  • <li> is different from <LI>

  • 3) End tags are required for non empty elements:
  • <p>This day is nice</p> <p>The sun is out</p> GOOD.
    <p>This day is nice</p> The sun is out BAD.

  • 4) Attribute values must be quoted
  • <td rowspan="3"> GOOD
    <td rowspan=3> BAD

  • 5) Empty Elements must either have an end tag orthe start tag must end with />
  • <hr></hr> or <br /> <hr /> Good
    <br> <hr> BAD

    XHTML comes in two flavors strict and conditional.

    XHTML Transitional may be used when you are making a change from an old markup to a more efficient modern one, or when you are left with an inherited markup that is not easily converted to comply with a strict DOCTYPE.

    With all that has been said, one should always aim for XHTML Strict Markup.

    XHTML Strict enforces the strict separation of document structure and document presentation. What i mean by that is the that the document presentation should be left or must be solely handled by CSS. Another benefit of using Strict XHTML is that web browser use their most standard compliant rendering modes while rendering your pages.

    Elements that are not allowed in Strict DOCTYPEs:

  • center, font, iframe, strike, u.
  • Attributes not allowed in Strict DOCTYPEs:

  • align (allowed on elements related to tables: col, colgroup, tbody, td, tfoot, th, thead, and tr)
  • language, background, bgcolor, hspace, noshade, nowrap, target, text, link, vlink, and alink, vspace
  • border (allowed on table)
  • height (allowed on img and object)
  • name (allowed in HTML 4.01 Strict, not allowed on form and img in XHTML 1.0 Strict)
  • width (allowed on img, object, table, col, and colgroup)
  • Contextual Differences:

  • text and images need to be contained in a block level element like p or div ie:
    <div id="div-example">
    < img src="#" />
    </div>
  • text in blockquote elements must be wrapped in a block level element like p or div
  • input elements must not be direct descendants of a form element
  • That’s All Folks

    Comments

    2 Comments
    1. The best information i have found exactly here. Keep going Thank you

      Comment by buy_vigrxplus on July 14, 2009 at 9:28 am

    2. LnddMiles

      The best information i have found exactly here. Keep going Thank you

      Comment by LnddMiles on July 21, 2009 at 1:30 pm