(SOLVED) HTML5 table border | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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
Xemonix
Xemonix - avatar
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
Xemonix
Xemonix - avatar
+ 9
HrCoder 🤔🤔🤔 Thanks. I'll try out both
9th Aug 2021, 3:05 PM
Xemonix
Xemonix - avatar
+ 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