This works,
h1::before{content:'# '}
h2::before{content:'## '}
<h1>Level-1 heading</h1>
<h2>Level-2 heading</h2>
but I think it is more correct to use ::marker
. For some reason, ::marker
doesn’t work for me. Why is that?
h1,h2,h3,h4,h5,h6{display:list-item}
h1::marker{content: '# '}
h2::marker{content: '## '}
<h1>Level-1 heading</h1>
<h2>Level-1 heading</h2>