Need help? Check out our Support site, then

How to recreate font style of <pre> tag

  1. I really like the look of the font from the preformatted

     tag. However, it's a hassle to actually use the 
     tag in my posts because it doesn't automatically break lines, and I have to manually insert break lines to format my posts.
     text onto a Microsoft Word document, I have 9-point Consolas font, formatted to HTML Preformatting. To try to mimic this, I add the tag <span style="font: 10pt consolas;">. However, 10pt is too small, and 11pt is too big (I can't make it fall in between). The same problem goes when replacing 10pt and 11pt with 95% and 100%, respectively.
    On top of that, the span tag seems to be missing something, because while the font is correct, the formatting just looks different. When I pasted my new text to the Word document, I have formatting set to apple-style-span, as well as a larger font than I would like.
    Is there any way for me to perfectly mimic the font style, formatting, and size of 
     without having to manually enter line breaks?

    The blog I need help with is

  2. The font browsers assign to monospaced text is Courier typically. Just use a span tag to declare that font, or perhaps wrap all the text in a div which declares courier as the font.

    <div style="font-family:courier;">All of your text and paragraphs here</div>

Topic Closed

This topic has been closed to new replies.

About this Topic