0

For insert image, must with tag <img src="blablabla.com" alt= "" /> . The question is, what the function of tag alt="" ? Thnks

HTML

30th Jun 2017, 7:22 AM
Fariz Duta Nugraha
Fariz Duta Nugraha - avatar
10 ответов
+ 12
Yaaap, alt attribute must be specified for those who have visual problems, the alt attribute is readed by the vocal speaker to help them... remember that the attribute have to contain an alternative description and not a title for the image. Another good practice is set a title attribute for your HTML elements, because when you'll drag your mouse on an element there will be a little pop-up with the title, also good for those who have visual problems. Google uses that attribute to describe their services and how to use every single element. With HTML5 you can use the title attribute on any HTML element. If you want to be professional, remember that accessibility is one of the most important thing while developing a website, web is for all. ;) PS - Kuba preceded me. :(
30th Jun 2017, 7:57 AM
Maz
Maz - avatar
+ 9
alt is crucial for tagging images for search engines. If you are placing an image of a black horse and give the alt description as "black horse running", google, bing and other search engines will place this image in their 'images' tab when someone is searching for "black horse running". Also, a good practice for making your webpage accessible for people with disabilities. Professional parsers not only know how to pronounce a text which is marked as <strong> or <em>, but also know how to deal with images, if they have their alt attribute filled in properly. Bottom line: it's always good to add alt to <img> ;)
30th Jun 2017, 7:57 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 4
the alt Attribute shows if the src file does not exist or there's an error loaing it
30th Jun 2017, 7:33 AM
MCJEH
MCJEH - avatar
+ 4
if it's blank it doesn't mess anything up, and div tags r container tags that separate the inner content from the rest, just to keep things more organized and you could also style divs differently
30th Jun 2017, 7:46 AM
MCJEH
MCJEH - avatar
+ 4
no prob
30th Jun 2017, 7:51 AM
MCJEH
MCJEH - avatar
+ 4
another reason to add alt attribute is users with low bandwidth or mobile users. these people tend to "turn off displaying images" when they browse, and if they found that your site doesn't have an alternative text they would leave it immediately and wouldn't visit it again.
30th Jun 2017, 8:38 AM
Mohamed Mohamedy
Mohamed Mohamedy - avatar
+ 4
@Maz ;)
30th Jun 2017, 8:45 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 1
thanks all, and thanks @Maz :)
30th Jun 2017, 9:34 AM
Fariz Duta Nugraha
Fariz Duta Nugraha - avatar
0
are if im not iserted it is no problem? and one more question, what the function tags <div> ? thanks
30th Jun 2017, 7:41 AM
Fariz Duta Nugraha
Fariz Duta Nugraha - avatar
0
thank you so much bro
30th Jun 2017, 7:50 AM
Fariz Duta Nugraha
Fariz Duta Nugraha - avatar