What does alt=ā€œā€ do? And what is class=ā€œā€ exactly? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

What does alt=ā€œā€ do? And what is class=ā€œā€ exactly?

I donā€™t understand what class=ā€œā€ stands for.. And neither whatā€™s the use of the alt=ā€œā€

25th Aug 2018, 3:31 PM
dun
2 Respostas
+ 1
Example; <body> <style> .title { color: red; text-align: center; } </style> <div class="title">My Title</div> <img src="fish.png" alt="Fish Picture" /> </body>
25th Aug 2018, 4:16 PM
Sousou
Sousou - avatar
+ 3
Clsss šŸ‘‰Ā attribute specifies one or more classnames for an element. TheĀ classĀ attribute is mostly used to point to aĀ classĀ in a style sheet. However, it can also be used by a JavaScript (via theĀ HTMLĀ DOM) to make changes toĀ HTMLelements with a specifiedĀ class. AltšŸ‘‰Ā altĀ attribute specifies an alternate text for an image, if the image cannot be displayed. TheĀ altĀ attribute provides alternative information for an image if a user for some reason cannot view itĀ 
25th Aug 2018, 3:42 PM
Sudarshan Rai
Sudarshan Rai - avatar