Why does using <b> makes my text go to the next line?

I am just a beginner, so this might be a stupid question. I wanted to make few words in my text bold by adding <b></b> but when I do it the text goes to the next line and it looks like this:

Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

Nulla

pulvinar eleifend sem. Aenean vel massa quis mauris vehicula lacinia. Maecenas aliquet accumsan leo. Nullam eget nisl. Pellentesque

pretium

lectus id turpis. Integer lacinia. Mauris dolor felis, sagittis a

Anyone know how to solve it?

1 answer

  • answered 2018-10-25 03:42 Jpegzilla

    Since I assume you want all your text to flow in line, instead of line breaking, consider wrapping words you want to be bold in a span, like so:

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <span class="bold">Nulla</span> pulvinar eleifend sem.

    And then write in your css:

    .bold { font-weight: bold; }

    This way you won't line-break when you don't need to.