Archive for February, 2008

DIVs vs. Tables

table.jpg
DIVs vs. Tables: What will you choose for your webpage?
Tables have always prompted eye-gouging hissy fits amongst different web designers and accessibility advocates of every stripe. Both the side saddle with myth and have debated in larger part from the conventional ideology.

Why Table layouts were preferred?
Most of us know that prior to the arrival of style sheets, layout tables worked fine with everyone. Experts felt that Data tables were hard and most users preferred layout tables, as they were simple. Most people preferred tables for two reasons over DIVs. Firstly, they were around for a longer period with the web designers. Secondly, they offer a faster method for creating page layouts that are grid-based.

Simple layouts have been amongst the few reasons that have made some users have gripes against DIVs. Again, DIVs have sketchy supports for numerous browsers too. Experts used to feel that it will always be a difficult task of replacing tabular layouts with DIVs. Tabular layouts have mostly similar layouts in numerous ancient browsers (graphical).

Advantages of DIVs
However recently, some of the web designers have felt that DIVs have numerous advantages over tabular layouts. They have found out that DIVs are:

  • Having page size much smaller than tables and are quicker in loading on most browsers
  • The flexibility of future with further development is there with DIVs
  • The source file is much easier for reading
  • DIVs are friendlier in terms of different search engines

Reason for which you should shift from layout tables
Layout tables were formulated for providing structures to a data, meaning all the data had a particular variable and they were systematically stored. This was the intended use of the tables. Wide deployed subsets are included in HTML 3.2. Its standard says that tables could be utilized for tabular markup or for layouts.

However, languages in draft indicate that semantic or structural uses are preferred. This matter has even been settled with the continuously growing DIVs support. Experts feel that separating the structural data reduces the cost of maintaining them for the webmasters. Mixing the information leads to increase in ownership cost and less portability in between media and applications. With the use of tables, semantic meaning of the web page is lost. Text-only or speech browsers do not enjoy such layouts. DIVs switching allows the formation of a simple and accessible decipher web page.

How can DIVs give better performance?
Some web designers feel that DIVs can never be a replacement for such table-based layouts. Still, they feel that if browsers can work their act properly, the former can create simple layouts with little hassle. It provides you with an easy and simple environment for changing layouts. There is no requirement for modifying each page in DIVs, which is the case with tables. Again supplementing the data with extra sections are also considered simpler than their counterpart.

The final decision is in your hand
It is sometimes difficult to decide on table layouts and DIVs as both of them have striking advantages and disadvantages. Table poses hard work and extra cost to web owners, whereas DIVs might not be compatible with different browsers. In the end, the decision is in your hand to decide what will it be for your web page: An ancient table or a modern DIV or CSS.

Difference between HTML and XHTML

xhtml11.png
Difference between HTML and XHTML
Few years back only there was a fire blazing to use HTML code for designing websites. Its presentation was later on succeeded by CSS. CSS used style sheets for the purposes. These definitely improved the materialization and appearance of all the websites. Today, HTML has been further improvised to XHTML.

XHTML is a more stable, sharpened and sophisticated version. This further introduced the concept of tagging into the websites. While going through modern version, most Word Press themes have been designed on XHTML rather then HTML. With the use of XHTML done in bulk across the web, it is imperative for users, who are designing, changing or preparing their themes, to know the difference between XHTML & HTML. These differences might even help in knowing the different validation errors, which usually arise from improper XHTML usage.

What is HTML & XHTML?
Hyper Text Markup Language or HTML is the means for describing the structure of text information in all web documents. It also helps in supplementing texts with embedded images, interactive forms and numerous objects. Extensible Hyper Text Markup Language or XHTML is similar in most features to HTML. It has been designed for being a HTML successor. Most experts say that the best way of referring XHTML is to call it a better HTML.

The Differences
With a basic knowledge about HTML, you are going to feel glad in knowing that major part of the HTML scripts is still applicable in XHTML. XHTML is nothing but a completion HTML codes.

All the tags should be closed
Tag closing is a compulsion in XHTML. In HTML,

tag can be used for opening it and not for closing. In HTML, there is a liberty to ignore validation of the code. However in XHTML, such concept is incorrect and the code would never validate.

XHTML closes the tags that were previously left open by HTML and hence completes it. These closing tags were always necessary. By using XHTML, you are just enforcing it.

Self-closing tags
XHTML now puts more emphasis on closing ALL the tags and it is not limited only to an open tag. Items including images or line breaks that are without HTML closing tags should have XHTML self-closing.

Alternative Text Images
All the XHTML image tags should be provided with alt attributes. None of the attributes are the region for editorial commentaries about any picture. Alt tags should always contain the image description. This allows them to meet requirements for accessibility along with different web standards.

Tagging in nested form
In XHTML, closing of the nested tags should be done in the same form in which opening was performed. Although nesting is also followed in HTML, yet it is not as strict as in XHTML.

Use of lowercase tags
In case of HTML, you can get away even if you are using tags in uppercase similar to
. However with XHTML, all the tags should be in lowercase similar to
.

It can be said that both these themes are almost similar. The only thing that differentiates both of them is that XHTML is stricter in rules than HTML.

Page 2 of 3Previous123Next