Try validating below HTML codes in https://validator.w3.org/#validate_by_input.
<!DOCTYPE html>
<html>
<head>
<title>hello</title>
</head>
<body>
<img src="238364.jpeg" width="100px" height="100px" alt="public image">
</body>
</html>
After validating you may find the below message:
Error: Bad value 100px for attribute width on element img: Expected a digit but saw p instead.
And when your remove px for height and width from above example you find NO ERROR or WARNING message. So just write height and width in digits only, px is predetermined so no need to mention it with digits.
Comments
Post a Comment