The simplest way to add a heading in your document is to apply a heading style:
Click Edit Document > Edit in Word for the web if you haven’t already opened your document for editing.
Type your heading and keep your cursor on that line.
Click Home, and then click the heading style you want in the Styles gallery.
Tip: If you don't see the style you want, click the down arrow next to the Styles gallery to expand the gallery.