Milan doesn't really have many Hostels, but they do have numerous budget hotels. Hotel San Tomaso and Hotel Sabatino were two of the cheapest hotels in Milan that weren't hideously creepy.
In Florence, I heard that the David Inn was a great score for location, but kind of grubby.
Most of my notes and info from Italy is packed away right now... but my best suggestion is to go around various websites (though travelpunk is the best) and see what appeals to you as far as a mix between price and location.
"Life's about choices, LT." (J. Tyskiewicz)
DON'T DRINK THE WATER. Fish have sex in it.