How to create a divider line in wordpress

Written by marie cartwright
  • Share
  • Tweet
  • Share
  • Email

A line divider is a clear way of breaking up sections of text. You can't create a line divider in WordPress' visual post editor mode, as it lacks a visual editing tool for line dividers, but you can quickly put in a line by manually adding it to the post's HTML code. Simply copy-and-paste this code if you don't have much experience with HTML; however, if you need to edit the way the line looks, a bit of HTML knowledge can come in handy.

Skill level:
Moderately Easy


  1. 1

    Click the "HTML" tab on the top of the post editing field.

  2. 2

    Type your first section of text into the post.

  3. 3

    Add the following HTML code. This code creates a black line divider that extends across the width of the entire post. Adjust the width, pixel height and background colour hex code as needed. Place your second line of text beneath the divider.

    This is the first line of text.

    <div style="width:100%; height:2px; background:#000000;"></div>

    This is the second line of text.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.