I am basically styling a long essay with various images scattered throughout. I would like the first image to "float: left" and the second one to "float: right". I know that I can style the images like this:
img {
float: left;
}
This makes each image have the same style. How do I style each image differently? I tried to put each image in a different div class, so that I could style them differently, but it didn't work.
I also understand, that I could style each image in the html tag, like this:
<img src="ABCD.png" alt="Raoul Hausmann's ABCD" align="left" height="300px">
I keep hearing that it is best to keep style in the external style sheet (CSS), separate from the html. Is this a case where inline styling is necessary?
height
attribute on theimg
tag is no longer the preferred way to do this; use theheight
CSS attribute instead. Same withalign
. – Slavey