document type可以説明流覽器識別頁面是在哪一種標準下工作,是在html4.01,xhtml 1.0 traditional,或者xhtml1.0 strict....,每一種標準下,頁面的表現都會有一些差異,所以千萬不能丟(除非你僅僅是做一個很小的測試)。
記得加上:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml">
沒有留言:
張貼留言