CSS: display:run-in vs span

Tutoring web design, you develop preferences. The tutor shows a way to accomplish emphasized lead-in text.

Sometimes, the writer might want to lead a paragraph with attention-catching, larger type, perhaps having different color and font. One idea of how to do so might be something like

<h2 style=”display:run-in;color:#992299″>Emphasized beginning</h2>

However, for the purpose of this article, I’ve had much better success with simply

<span style=”font-size:150%;color:#992299″>Emphasized beginning</span>

This is how the purple lead-in words were accomplished in the first paragraph.

Source:

Meyer, Eric A. CSS Pocket Reference. Cambridge: O’Reilly, 2004.

w3schools

css-tricks.com

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Leave a Reply