Nombre...">

New design for width in XHTML?

I built the table as follows:

<table width="100%" border="0"> <tr> <td width="20%"> Nombre </td> </tr> </table> 

but I have a warning "Validation (XHTML 1.0 Transitional):" Attribute Width "is deprecated. A newer construction is recommended"

What is the newer design for width in XHTML?

+4
source share
2 answers

The width attribute for <td> been deprecated .

You must replace the width attribute with the CSS width property:

 <table width="100%" border="0"> <tr> <td style="width: 20%;"> Nombre </td> </tr> </table> 
+4
source

Use only CSS attributes:

 <table style="width:100%; border:0px;"> <tr> <td style="width:20%;"> Nombre </td> </tr> </table> 
+2
source

Source: https://habr.com/ru/post/1445194/


All Articles