Cute, Simple Heading Designs for Your Blog: Copy-and-Paste CSS

Contents

This post was automatically translated by AI from the Japanese original. The screenshots are in Japanese.
I’ve prepared some simple heading designs you can use just by copying and pasting the CSS.
Feel free to change the font size and colors.
Choose a color and a shape to make the code
Choose your favorite color and design, and you’ll get CSS ready to copy and paste.
If you’d rather get started than browse the samples, start here.
Turn on JavaScript to choose a color and a shape and get the code. You can also copy the sample code below.
Why use headings
Headings make your posts easier to read.
- They tell readers the main points of the post
- They help readers find the information they want quickly
- On some services, a table of contents can be made automatically from the headings
Simple heading designs
Lines above and below
It’s simple, but a very easy design to use.

h2{ margin:30px; padding:12px; text-align:center; border-top:1px solid #DDD; border-bottom:1px solid #DDD;}
Matching the color of the text and the lines is cute too.
h2{ margin:30px; padding:12px; color:#F08972; text-align:center; border-top:1px solid #F08972; border-bottom:1px solid #F08972;}Double lines

h2{ margin:30px; padding:12px; text-align:center; border-top:4px double #DDD; border-bottom:4px double #DDD;}Lines on the left and right

h2{ text-align:center;}h2:before,h2:after { content:""; display:inline-block; width:120px; height:1px; margin:0 10px; background-color: #DDD; vertical-align: middle;}Make the margin larger to widen the space between the title and the lines.
You can adjust the length of the lines with width.
Lines of different thickness

h2 { position: relative; padding: 12px; text-align:center;}h2:before,h2:after { position: absolute; left: 0; content: ''; width: 100%; height: 6px; box-sizing: border-box;}h2:before { top: 0; border-top: 2px solid #ddd; border-bottom: 1px solid #ddd;}h2:after { bottom: 0; border-top: 1px solid #ddd; border-bottom: 2px solid #ddd;}
Swapping the thick lines gives it a different feel.
h2 { position: relative; padding: 12px; text-align:center;}h2:before,h2:after { position: absolute; left: 0; content: ''; width: 100%; height: 6px; box-sizing: border-box;}h2:before { top: 0; border-top: 1px solid #ddd; border-bottom: 2px solid #ddd;}h2:after { bottom: 0; border-top: 2px solid #ddd; border-bottom: 1px solid #ddd;}A background color

h2 { position: relative; text-align:center; color:#FFF; padding: 10px; background-color: #8BC0B8; box-shadow: 0px 0px 0px 6px #8BC0B8; border-top: 1px solid #fff; border-bottom: 1px solid #fff;}Shifting it a little

h2 { position:relative; margin:10px; display:inline-block; padding:10px 60px; border:1px solid #DDD; background:none;}h2:after { position: absolute; top:2px; left:6px; content:""; height:100%; width:100%; z-index:-999; -webkit-transform: rotate(-1deg); -moz-transform: rotate(-1deg); background:#FBDDC8;}Stripes

h2{ position: relative; text-align:center; padding: 10px; color:#474342; background: -webkit-repeating-linear-gradient(-45deg, #FBDDC8, #FBDDC8 6px,#F6BCAC 6px, #F6BCAC 12px); background: repeating-linear-gradient(-45deg, #FBDDC8, #FBDDC8 6px,#F6BCAC 6px, #F6BCAC 12px);}A striped underline

h2 { position: relative; padding: 10px;}h2:after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 6px; background: repeating-linear-gradient(-30deg, #82C5CA, #82C5CA 4px, #C1E2E4 4px, #C1E2E4 8px);}


