Aligning Images with CSS

My students want to align their images on their style sheets…is there a way they can style just one image? They currently have more than one on their page and do not know how to signify which image they want the style rule applied to. Any help is appreciated!

I think you want to look into CSS classes.
These are taught here

Let us know how it goes.

3 Likes

For one image I would use an id. It’s a similar set up to a class, except you use a # in the css.

on the html page:
< img id = “demo” src=“fall.jpeg”
alt=“Bench in fall” >

on the css page:
#demo{

}

https://www.w3schools.com/css/css_syntax.asp

4 Likes

This was very helpful! It worked beautifully. My students and I appreciate the help!

3 Likes