0

What is difference between writing border="2" and border="2px"...?

14th Feb 2017, 1:36 PM
Himanshu Melkani
Himanshu Melkani - avatar
4 Antworten
+ 3
Both are equivalent in previous version of Html, but are attributes deprecated in Html5. You must use css border properties to style them ^^
14th Feb 2017, 9:15 PM
visph
visph - avatar
+ 2
one works and the second is an error!
14th Feb 2017, 1:43 PM
Kamil
Kamil - avatar
+ 2
you always need a unit in css (exept 0 cause it's always 0) if you don't specify one, to (clever) browsers take it as pixel, but it's definetly invalid code
14th Feb 2017, 1:44 PM
Kamil
Kamil - avatar
+ 1
Thanks #kamil & #visph
15th Feb 2017, 12:35 AM
Himanshu Melkani
Himanshu Melkani - avatar