Descriptive alt text and image dimensions for a mascot hero
A mascot image near the top of a page can add personality, but it should not make the page harder to use. Two practical steps: describe meaningful images for people using screen readers, and include width and height so browsers can reserve the right space as the image loads.
Write alt text for the image’s purpose
For an informative image, describe the visible details that matter in context. For Banjo, that could be: “A kangaroo wearing aviator sunglasses and a red bow tie, sitting by a stone fireplace with snowy mountains outside.”
Keep it concise and avoid stuffing in keywords. If the image is purely decorative and adds no information beyond nearby text, use empty alt text ( alt="" ) instead.
Set intrinsic dimensions
Use the image’s actual pixel dimensions for width and height . The browser can use them to calculate the image’s aspect ratio and reserve space before the file finishes loading. That helps reduce unexpected layout movement.…