Try looking at the source code for Tidy.
HTML before running through Tidy:
<html>
<head>
<title>boo</title>
</head>
<body>
x < y
</body>
</html>
Same HTML after running through Tidy:
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<title>boo</title>
</head>
<body>
x < y
</body>
</html>
Notice that x < y
was changed to x < y
.
UPDATE
Based on your comment, you should probably use Tidy to clean up your HTML. I believe there are Tidy libraries for most of the common languages, that will clean up your HTML for you. If you are using PHP, there is PHP Tidy.
UPDATE
I noticed that you said you're using C#. You can use Tidy with C# as well. Here's something I found. I don't develop in C# and I haven't tried this out so YMMV:
Fix Up Your HTML with HTML Tidy and .NET