ASP.NET currently does not output valid XHTML (ASP.NET 2.0/Whidbey will though). But there is a C# class (via The Code Project site) that can be used which outputs valid XHTML. It intercepts the code before it is sent to the client - so you may get a performance hit (which will probably only be a problem if you get lots of visitors to the page)
There is another article on The Code Project, User Friendly ASP.NET Exception Handling that improves on the default unhandled exception handler in several ways. It enables you to email exceptions to the site administrators, log to a file, log to the event log or display to the end user (with the same colour scheme as the default one, but it provides more information).