Friday, October 15, 2010

One Font Appearance For All Diverse Web Browsers

This is may a small thing that we as a web developer perhaps overlook it.

If we are building up the English-based website. The following manner of xHTML coding shoude be adopted, otherwise the font appearance may distract from its determined code.

At html tag, we should identify obviously which language is most influential to that certain page. Aside from that, `charset` under tag of Meta may put "utf-8" rather than "ISO-8859-1". This charset has large coverage in terms of language support.

The example is demononstrated as below,

<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<meta equiv="Content-Type" content="text/html; charset=utf-8">

If we creat a new html file from Dreamweaver, The html tag will just merely show
<html xmlns="http://www.w3.org/1999/xhtml">. That does not include lang attribute.

No comments: