English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

When the alt text for an image appears, I want to make it larger than the browser's default. Is this something that can be done with css or javascript?

For example: when I hover over an image it displays a box with a white background and about a 10-12 point font. Can I change this background color or change the font size and/or decoration (bold, italics, etc).

2007-12-12 23:26:03 · 3 answers · asked by Justin H 7 in Computers & Internet Programming & Design

3 answers

alt isn't a tag - it's an attribute of the img, area, etc. tags. As such, CSS provides no means to address it. You're stuck, accepting the browser's style attributes. Further, if you're relying on alt for tip-like behavior, you risk this failing in modern, standards-compliant browser, since that is not the purpose of the alt attribute. alt is intended to provide a textual substitute for visually impaired users or users who elect not to view images. To get the mouseover tip behavior more reliably in a compliant fashion, use the title attribute.

2007-12-13 05:27:02 · answer #1 · answered by richarduie 6 · 0 0

A HTML tag is a couple of distinctive codes which regulate the way in which where textual content or different content material is displayed in a browser. A HTML record is without difficulty a record which comprises textual content and different content material and the tags which regulate them.

2016-09-05 11:27:46 · answer #2 · answered by ? 1 · 0 0

You can set that up in css as you would any other tag.

2007-12-12 23:56:38 · answer #3 · answered by Ironhead 4 · 0 1

fedest.com, questions and answers