+6  A: 

FireBug for Firefox will display the HTML corresponding to what you see in the browser window right now (that is including any modifications made in JavaScript).

Willis Blackburn
It will, but there's some caveats... for instance, it can have troubles with showing things that change while it's open.
Matthew Scharley
+1 for Firebug. I don't know how I ever managed without it.
Simon P Stevens
it also doesn't show pseudo-elements like :after and :before http://www.w3.org/TR/CSS2/generate.html#before-after-content
Litso
+5  A: 

Firefox's Web Developer extension will allow you to do this. After you install it, just select View Source->View Generated Source.

Ryan Rivest
Yes, but what it won't show you is the generated HTML of a page viewed in an IFRAME. I had a need for that recently and it's the one variation that's missing (it'll show you the raw HTML, but generated for the containing page only)
Cruachan
Hmm, I didn't know about that. Thanks for the tip! :)
Ryan Rivest
+1  A: 

You can use javascript:document.write("<xmp>"+document.documentElement.innerHTML+"</xmp>"); in IE to view the generated source. Paste the above and execute in address bar of IE.

SKR