You’re viewing an archive of outdated material. Visit The Web Standards Project’s updated site to learn about our current mission.
border
on ImagesThe border
property causes the border to be drawn
under images. This page contains the following
stylesheet:
BODY { background: #CCCCCC; color: black; } IMG { border: solid lime 10px; }
Here is an image:
You can see the fact that the border is inside the image quite clearly when the picture is not displayed - for example, if it cannot find the file:
(There is actually another issue here. Technically speaking, the
alt
text of an IMG
element should be
rendered in the flow of text. It is a replacement
for the image, not merely a textual description that should be
rendered where the image would be.)