Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Positioning image alt text

Tags:

html

css

I have a large table with a large number of entries corresponding to an equally large number of images. The requirement is to display an alt text for every image which could not be found on the server. The alt attribute of is working fine.

However, I am not able to position the alt text - cell padding, spacing, margins etc. which apply to the image do not seem to apply to the alt text.

It may be of relevance that we are using tables for the layout of the page.

Does anybody know a method to position the alt text?

like image 756
KJ Saxena Avatar asked Jul 31 '09 11:07

KJ Saxena


People also ask

Does alt text HELP SEO ranking?

How Does Alt Text Impact SEO? We've already highlighted that setting alt text for images is very important for SEO and is a key contributing search engine ranking factor. Alt tags provide context to what an image is displaying, informing search engine crawlers and allowing them to index an image correctly.

How long should alt text be for images?

While ALT tags need to be descriptive, they also need to be brief. They should not be full sentences or paragraphs. With a limit of about 125 characters, an ALT tag should provide enough detail for users and search engines to relate the image to the context of the page.


1 Answers

img {     width: 100px;     height: 50px;     line-height: 50px;     text-align: center; } 

Sets the alt vertical and horizontal align to middle.

like image 172
Mike Avatar answered Oct 16 '22 03:10

Mike