The codes can be found here:
http://www.w3schools.com/css/tryit.asp?filename=trycss_float_elements
&l
The widths given in the markup are semantic statements about how large the image is. For that reason, in HTML5 it is only valid to give the dimensions in pixels.
The widths given in the CSS are directives to the layout engine as to how much space to use when put the images on screen. They can be in any standard CSS units
See BoltClock's answer for how they interact when laying the page out.