How to Create a Heading in Google Docs with a Full-Width Background Color Without Using Tables

Document headings (Heading 1, Heading 2, …) are useful to show a document’s content hierarchy. But, unless styled, it can still be difficult to visually scan a document to quickly find different sections. Some techniques to add styling and improve visual hierarchy include

  • using a horizontal line to separate sections
  • using a background color
  • changing the heading text color

All of these styles, except the one with the different background color, look fine, but they may not suffice if you want high-contrasting section headings. You can put heading text in a 1×1 table, as shown below, but that’s not ideal, especially if your document may be parsed.

To create a table-less heading with full-width background color, do the following:

  1. Type your heading on its own line
  2. Select the entire heading line (triple-click to include whitespace after the text)
  3. Go to Format → Line & paragraph spacing
    • Click Single
    • Click Remove space before paragraph
    • Click Remove space after paragraph
  4. With the line still selected, go to Format → Paragraph styles → Borders and shading
    • Background color: e.g. #1F2933
    • Border width: 0 pt (all sides)
    • Paragraph padding: e.g., 6 pt or 7 pt

You can optionally style the heading text and create a reusable heading style (Format → Paragraph styles → Heading 1 → Update “Heading 1” to match).

Here’s a link to the test document used in this post.