skip to Main Content

I need to add space between “who” and “we are”. If I add space inside it’s delete in DOM.

<h2>
<span>who</span>
<br>we are
</h2>

I want to add this space, becouse in seo audits i have:

whowe are

I want:

who we are

2

Answers


  1. Use &nbsp;

    <h2>
    <span>who</span>&nbsp;
    <br/>we are
    </h2>
    Login or Signup to reply.
  2. Well, for SEO and maybe accessibility (as well as using some browser related features like Mozilla Firefox reading mode, RSS Feeds and such sings), you will improve the structure of your markup by using a close to english language, using a single sentence and then use css styles to put the content in two lines.

    That’s what CSS is for, set the apparence of your content. In your case you use HTML which is intended to structure your content. Changing HTML purpose is the cause of your issue.

    <h2>
    <span>who</span> we are
    </h2>
    

    with a style that will lead to a one liner span should do the job :

    h2 span {
      display: block;
    }
    

    Or anyone of the others solutions to this simple CSS behavior.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search