شرح صفوف ومحتوى الفقرة
تُستخدم خاصية [cellspacing] داخل عنصر <table> في HTML التقليدي لعمل مسافات خارج الخلايا.
قيمة cellspacing attribute:
- تكتب في الصيغة التاريخية عددًا مثل cellspacing="10". قد تتسامح المتصفحات مع px في الشفرة القديمة، لكن لا تعتمد على ذلك. ومع ذلك، يُفضل في التصميمات الحديثة استخدام CSS لتحديد المسافات.
البديل الحديث هو table { border-collapse: separate; border-spacing: 10px; }. لا تؤثر border-spacing عندما تكون border-collapse مساويةً لـcollapse.
Cellspacing Without Pixel
كتابة القيمة داخل خاصية cellspacing دون وحدة px.
HTML
<table border="1" bordercolor="red" bgcolor="yellow" width="500" cellspacing="10">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
<th>Age</th>
<th>Study</th>
</tr>
</table>
Cellspacing With Pixel
مثال تاريخي على تسامح المتصفح مع px داخل cellspacing، وليس الصيغة الموصى بها.
HTML
<table border="1" bordercolor="red" bgcolor="yellow" width="500" cellspacing="10px">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
<th>Age</th>
<th>Study</th>
</tr>
</table>