Why is Chrome rendering this HTML as a completely blank page? From Node.js, following The Node Beginner Book

So I've sent the following HTML to my browser using Node.js:

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
    <form action="/upload" method="post">
        <textarea name="text" rows="20" cols="60"></textarea>
        <input type="submit" value="Submit text" />
    </form>
</body>
</html>

But the browser is showing a completely white blank page. When I view source, however, I see exactly what you see above, which I just copied and pasted out of Chrome's "view source" utility. Why is Chrome rendering that HTML as a blank page? I have a screenshot below.

This is the Node.js code I am using to send the HTML to the browser:

function start(response) {
    console.log("Request handler 'start' was called.");
    var body = '<!DOCTYPE html>\n'+
               '<html>\n'+
               '<head>\n'+
               '    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n'+
               '</head>\n'+
               '<body>\n'+
               '    <form action="/upload" method="post">\n'+
               '        <textarea name="text" rows="20" cols="60"></textarea>\n'+
               '        <input type="submit" value="Submit text" />\n'+
               '    </form>\n'+
               '</body>\n'+
               '</html>\n';

    response.writeHead(200, {"Content-Type": "text/html"});
    response.write(body);
    response.end();
}

blank page -- in spite of good HTML that Chrome can show me...

==================================

Here is the answer included as an edit to the original posting, since this topic was closed (it is unfortunate that topics which are not answered can be closed by others than the poster). Anyway, just in case the original poster is following this, I dug into this problem since I was having the exact same issue, nobody answered his question, and I uncovered the solution:

I have just resolved this issue of copying code snippets from a Kindle book to a text/source code editor of your choice. This same topic was discussed in a posting on stackoverflow.com entitled "Why is Chrome rendering this HTML as a completely blank page? From Node.js, following The Node Beginner Book [closed]". That particular posting describes the exact same problem I was experiencing (same Kindle book, same code snippet, same code symptom!). Unfortunately, that posting was prematurely closed before any of the respondents could provide the exact answer, otherwise I would've responded to that posting.

However, I dug into this issue more deeply and discovered the root cause of the problem when copying code snippets from Kindle books: when you copy text from the Kindle app, it uses hex code 0xA0 for space characters, not 0x20. Hex code 0xA0 is extended ASCII for non-breaking whitespace. Well, this doesn't work when you are expecting to copy-and-paste HTML literal strings, as was the case in the aforementioned posting.

And so this explains the behavior in the aforementioned posting: the original poster indicated that he could get around the problem by hand-retyping all of the text. It's because the hand re-typing was using proper 0x20.

This had other symptoms which I didn't understand at first but are now explained: my text editor (Notepad++) was not correctly identifying the reserved keywords in my source code. Again, this is because the keywords were separated by 0xA0, not 0x20. The keyword parser in Notepad++ must be tokenizing off of 0x20.

Solution: after pasting text from Kindle, perform a search and replace using regular expression searching capabilities in your source code editor. Search for regular expression \xA0 and replace it with \x20 (or, depending on your editor just type in a single space bar character in the Replace field [that is how Notepad++ works]).

I bet this is because you didn't set the content length header (Content-Length). I thought Node.js would do that automatically but maybe it doesn't.

This was an issue in the past but I thought it had been fixed in chrome. Maybe you have an older version.

try:

response.writeHead(200, {"Content-Type": "text/html", "Content-Length" : body.length });

And then look in the Chrome developer tools network tab and see if the header is being set.

using the server example code from nodejs.org and your html works fine in Chrome Version 23.0.1271.64:

var http = require('http');
http.createServer(function (req, res) {
  var body = '<!DOCTYPE html>\n'+
         '<html>\n'+
         '<head>\n'+
         '    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n'+
         '</head>\n'+
         '<body>\n'+
         '    <form action="/upload" method="post">\n'+
         '        <textarea name="text" rows="20" cols="60"></textarea>\n'+
         '        <input type="submit" value="Submit text" />\n'+
         '    </form>\n'+
         '</body>\n'+
         '</html>\n';
  res.writeHead(200, {'Content-Type': 'text/html'});
  res.write(body);
  res.end();
}).listen(3000, '127.0.0.1');
console.log('Server running at http://127.0.0.1:3000/');

so as legacy said, it must be something else

I tested using my own node.js server, and I think an extension is changing the html. Try accessing in a different browser, and in chrome in incognito mode.