Actually, you are completely wrong about it.
It does look and is correct. Your solution is not correct and is not valid.

The only thing you have to do: define the "alignright" class in your stylesheet once... and you will never need to adjust the code for every image of yours.
More: Read the Additional questions after #9 in this post.