+ 9

(SOLVED) HTML5 table border

Sololearn says, that border attribute is deprecated in HTML5. But if I do not specify this attribute, my table is borderless. How do you supposed to set borders for tables in HTML5?

9th Aug 2021, 2:57 PM
šŸ‡ŗšŸ‡¦ GUMBALL šŸ‡ŗšŸ‡¦ [Dead account]
4 Answers
+ 6
table { border: 1px solid; } Add this in css
9th Aug 2021, 3:00 PM
v@msišŸ˜‰
v@msišŸ˜‰ - avatar
+ 9
v@msišŸ˜‰ Thanks a lot! I haven't learned CSS yet, so I didn't think about it. Thanks šŸ˜Š
9th Aug 2021, 3:01 PM
šŸ‡ŗšŸ‡¦ GUMBALL šŸ‡ŗšŸ‡¦ [Dead account]
+ 9
HrCoder šŸ¤”šŸ¤”šŸ¤” Thanks. I'll try out both
9th Aug 2021, 3:05 PM
šŸ‡ŗšŸ‡¦ GUMBALL šŸ‡ŗšŸ‡¦ [Dead account]
+ 4
Use this table, th, td { border: 1px solid black; } Instead --> table { border: 1px solid black; }
9th Aug 2021, 3:04 PM
Pariket Thakur
Pariket Thakur - avatar