Sunday, November 21, 2010

In HTML, using CSS style control, how do I change a font size in the middle of a paragraph?

For example, I might want change a font to a larger size, different colour, different tytpe face for a few letters, then back to the original, but without starting a new paragraph. I understand how to do this with %26lt;FONT %26gt; ..... %26lt;/FONT%26gt;. However I have read that %26lt;FONT is not encouraged from HTML 4, but I see no other way of doing it.In HTML, using CSS style control, how do I change a font size in the middle of a paragraph?
You have to apply an inline style to it. Since it's in the middle of a paragraph, try this:



%26lt;p%26gt;Normal text%26lt;span style=';font-size: 14px;';%26gt; while this is large.%26lt;/span%26gt; This is back to normal.%26lt;/p%26gt;In HTML, using CSS style control, how do I change a font size in the middle of a paragraph?
Use a span tag.
  • names to match brother
  • No comments:

    Post a Comment