Aligning images

Is there a way to align an image (to the center, to the right, to the left).
I know there is a way to do it with classes but students just has one images and is not on the classes lesson yet.

@GordonBrune ,

There are a number of ways to center an image. Perhaps one of the easier ones for a beginner would be to put it inside a container (such as a div, but could be any container)
and then use css to style that container with text-align: center;

This would also work for left or right alignment.

Here’s a working example:

good luck!


1 Like

Students also learn how to use the float property in Lesson 11. This won’t help the student center an image, but it is an easy way to move it left or right of text.

1 Like