jsp中的警告:Attribute (cellpadding) is obsolete. Its use is discouraged in HTML5 documents.


Attribute (width) is obsolete. Its use is discouraged in HTML5 documents.
屬性(寬度)已過時。 在HTML5文檔中不鼓勵使用它。
Attribute (cellpadding) is obsolete. Its use is discouraged in HTML5 documents.
屬性(單元格內文字與邊框的距離)已過時。 在HTML5文檔中不鼓勵使用它。

HTML5 不支持<table> cellpadding屬性。請使用 CSS 代替。
cellpadding 屬性規定單元邊沿與單元內容之間的空間,以像素計。

這不是錯誤,只是警告,不影響題主寫的頁面執行的。
原因是 HTML5 已經廢棄了,如下:

<div width="500px"></div>

這種直接把 width、height、cellpadding 等之類的樣式屬性直接寫在 HTML 標簽里的做法,而是需要統一寫在 style 里(或者定義CSS中),如下:

<div style="width: 500px;"></div>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 html5中不再支持table的cellspacing和cellpadding屬性 在html5中不支持 JSP合用html5 嘗試(一) C#中的Obsolete HTML5中的SVG HTML5 because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME c jsp頁面中 undefined attribute name (data-options). 怎樣解決 Eclipse自定義HTML5,JSP模板 html5中設置字體
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM
的cellpadding 和 cellspacing ; 2) 如何用css實現 cellpadding, cellspacing ; 3) tr , th 是 有 border, 沒有 padding 的. html5與jsp之間的區別