FlerrElectronics FlerrElectronics - 21 days ago 4x
CSS Question

aligning a line of text left in a paragraph? CSS/HTML

I have a line of text like so:

I am john doe blah blah blah.

How can I align it like so:

I am john doe
blah blah blah


Several ways:

  1. Set the width of the text container so that the desired line break occurs
  2. Use <br> where you want the line break
  3. Wrap each 'line' of text in a <span>, and style them with CSS for the desired effect.

The 'right' way really depends on context. Perhaps you could say more about that.