Working with Headings
HTML provides six levels of heading elements to help you title sections of your content.
Usually, you’ll use an <h1> element for an HTML file’s top-level heading, then use <h2>, <h3>, <h4>, <h5>, and <h6> for successively subordinate headings.
(HTML 5 and CSS also allow for using the same type of heading element — usually <h1> — for all headings, and then styling those headings according to their position in the document’s structure. This frees you from having to choose appropriate heading levels as you type and edit.)
TypeMetal provides handy command shortcuts that let you quickly and easily:
- change a heading’s level
- convert a paragraph (<p>) to a heading element (<h1>-<h6>)
- convert a heading element (<h1>-<h6>) to a paragraph (<p>)
(A similar set of shortcuts is provided for working with lists.)
Changing a Heading’s Level, or Converting to a Heading
To choose a heading level for text surrounding the insertion point:
- Press Command+1 through Command+6, according to the level of heading you want, or
- Choose Structure → <h1> through <h6>
TypeMetal automatically infers the heading or paragraph elements to operate on from the insertion point or current selection. If there’s a heading to operate on, TypeMetal changes it the specified level. If there’s a paragraph to operate on, TypeMetal transforms it into a heading of the specified level.
Thus, you can type some text such as “Things to Remember”, press Command+2 to instantly turn it into a second-level heading (<h2>), and continue typing. Pressing the Return key exits you out of the heading element, so that the next thing you type will be put in an ordinary paragraph (unless you first choose a heading level, or invoke some other command that creates a different element).
Changing a Heading to a Paragraph
To transform a heading into a paragraph:
- Press Command+Shift+0 (Command + Shift + the zero key), or
- Choose Structure → Clear Heading from the menus
TypeMetal automatically infers the heading or paragraph elements to operate on from the insertion point or current selection. If there’s a heading to operate on, TypeMetal transforms it into a paragraph element.