6/30/2009

Common Doctype Difference

Most of designers will remove doctype for their html files. This is most easy way to get what they wanted. Such as 100% table and center all the contents. If you do this. You never pass W3C Validation. But we choose one doctype. Some of effect will be disabled. I tried to list some common difference for the doctype.

!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
Most of old version browser will support this type. And this doctype is the most similar to remove doctype effect.
  • Support - Height 100%
  • Support - IE Scrolling Bar Coloring
  • Not Support - Margin:0 Auto
  • Getting error for appling Img Padding and Border

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"
One of Dreamweaver selection doctype
  • Not Support - Height 100% (If you need to do 100%, you need to set html and body to 100% at your CSS sheet)
  • Not Support - IE Scrolling Bar Coloring
  • Support - Margin:0 Auto
  • Support- Img Padding

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&
Another one of Dreamweaver selection doctype. Xhtml type is almost no difference than above one. But you need to take care for writing html code at Xhtml file. The structure of coding is need at XHTML file.
  • At html file you can write
  • <strong><p>Content</strong></p>
  • But at XHTML type it will become an error
  • You also need to close the <br> tag be <br />

There are other difference doctype at html setting. If you have an interest. You can search it at Google. There is a lot of result for detail informations.

Powered by: i-web-design.org:Web Design,SEO Company | Smart-Info: Web Hosting,Web Design

6/05/2009

Doctype 基本屬性比較

Doctype 很容易會影響Layout上的表現,很多設計師為了方便直接地把Doctype刪除。可是這樣子是不能通過W3C的檢測。可是用上Doctype又做不到想要的東西。在這裡先說明一下doctype和常用的屬性通用性。

!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
老舊版本的瀏覽器多半是相容模式,基本上是最接近將Doctype刪除的Doctype。
  • Height 100% 支援
  • Margin 0 Auto 不支援
  • IE Scrolling Bar轉色支援
  • Img Padding 和Border 共時使用會出現問題
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"
Dreamweaver預計時提供的DTD文件之一
  • Height 100% 不支援 (需要在Body中加入Height 100%,FireFox則需於Body及Html加入Height 100%)
  • Margin 0 Auto 支援
  • IE Scrolling Bar轉色不支援
  • Img Padding 支援
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" ""
Dreamweaver預設時提供的DTD文件之一,Xhtml的內碼會比較特殊。 如<BR/> <P/> ,要求亦比較嚴肅…詳細不在此說明。
  • Height 100% 不支援 (需要在Body中加入Height 100%,FireFox則需於Body及Html加入Height 100%)
  • Margin 0 Auto 支援
  • IE Scrolling Bar轉色不支援
  • Img Padding 支援

Powered by
i-web-design.org:Web Design,SEO Company
Smart-Info: Web Hosting,Web Design