+ 2
html
what is class= in the following link? : <img alt="" class="img-circle" src="https://code.sololearn.com/Icons/Avatars/0.jpg">
7 Antworten
+ 1
Sorry I cant see your code, but from what I remember, a class is an attribute used for the Css.
All HTML elements with the same class attribute will have the same style.
If you are creating a page using only HTML, then you can simply ignore it, or if it generates problems you can eliminate it.
If on the other hand you are trying to use CSS then please reply me and I will take back my old notes
+ 1
Img-circle
0
Here class is an attribute and its value is img-circle. You can add any style to the image by assigning css properties to this class.
You can also add multiple class by keeping space between two class like class="img-test another-class"
0
Thank u Nidhi Ranpura that was really helpful
0
Oh okay Lui thank u for helping me out. Iam using only html.
0
if you are only using html you can use inline css by putting your css code in the style tags or you can code style as an attribute to the tag if you really don't want to use the class attribute.
0
if you are using not just one img and only want style for that, use id= or class=