How do I write and edit HTML?

Writing HTML code in text editor

Writing HTML code on TextEditor on Mac.