You centered the image inside the figure element using auto margin. But nothing will be centered by default (well I guess there are exceptions like the center element which you shouldn’t use anyway). By default elements and text flow left to right, top to bottom. Just like reading a book.