W3Schools is my go-to reference for all questions regarding how to write any aspect of HTML code. In fact, when I was recently asked a question about writing HTML that I couldn’t immediately answer, I turned to W3Schools.
W3Schools offers complete tutorials for learning to write HTML, CSS, Javascript, and PHP. If you’re just getting started, work through the tutorials in sequences. Each tutorial has a little interactive section where you can test your new knowledge. If you’re experienced and just need a quick reminder or clarification, W3Schools has that too.
Applications for Education
W3Schools is a great resource for the student who is capable of directing himself or herself through a sequence of tutorials. W3Schools is not great for a student who needs a clearly defined “do this now,” “do this next” type of lesson. For that type of student, I would recommend trying Thimble by Mozilla.