Assuming you're using Windows...yes, HTML coding (and other web coding) would work the same on a laptop. Equally configured, laptops will be much more expensive than the desktop counterpart, because of limited space and cooling methods. However, if you need a PC wherever you go, a laptop would be the ticket. I'm very hesitant to suggest a palmtop (HP Jordana, 3Com Palm Pilot) as I think they may be a bit too small for what you want and are even pricier than laptops.
As far as I know, coding of your type isn't exactly strenuous on the system. That doesn't mean you should find a 486 laptop and try going with that---it would be slow in general---nor do you need to buy a screaming 2.8GHz Pentium 4 system that's decked out either.
I'd try not to spend much over $1,000 on a new laptop based on the info given. While different CPU's will faster than others at a given speed, you'll not be noticing it. In otherwords, be cheap. There's no point in having something extravagant for what you're doing.
Compaq makes some nice laptops (the brand is still being sold despite being bought out by HP), and you may be able to get a good deal on a clearance or display model.