A text editor may be a simple program, but that doesn't mean they're all the same for coding HTML5 and CSS3. Some programs have a history of causing problems for beginners (and experienced developers, too). There's usually no need to use some of these weaker choices.
Microsoft Word
Just don't use it for web development. Word is a word processor. Even though, theoretically, it can create web pages, the HTML code it writes is absolutely horrific. As an example, a blank document was created, “Hello World” was written in it, the font was changed, and it was saved as HTML.
The resulting page was non-compliant code, was not quite HTML or XHTML, and was 114 lines long. Word is getting better, but it's just not a good web development tool. In fact, don't use any word processor. They're just not designed for this kind of work.
Windows Notepad
Notepad is everywhere, and it's free. That's the good news. However, Notepad doesn't have a lot of the features you might need, such as line numbers, multiple documents, or macros. Use it if you're on an unfamiliar machine, but try something else if you can. Many people begin with Notepad, but it won't be long until you outgrow its limitations.
Mac TextEdit
Mac has a simple text editor built in — TextEdit — that's similar to Notepad, but closer to a word processor than a programmer's text editor. TextEdit saves files in a number of formats. If you want to use it to write web pages, you must save your files in plain-text format, and you must not use any of TextEdit's formatting features. It's best not to use TextEdit unless you have to.