Basic HTML: Explaining the PRE tag

Written by | Posted in Tutorials | Posted on Date 29-03-2010 | Comments 1 Comment
Tags: ,

The PRE tag, or <pre> is short for preformatting. It is a way to space your text the way you like, especially for those who like to do poetry with some fancy spacing. The PRE tag allows you to leave your text exactly how you typed it, including the spaces.

The PRE tag requires an opening and closing tag.

Just an example

I loved to watch the sunset
blue sky
f a  d   e    s
   into orange and red and yellow
        then
s
i
n
k
s
below the
h o r i z o n

This was the code used:

<pre>
I loved to watch the sunset
blue sky
f a d e s
into orange and red and yellow
then
s
i
n
k
s
below the
h o r i z o n
</pre>

Pretty cool trick, huh? So for those who like to write poetry or even for a dramatic effect, this is a pretty nifty html tag to use. Although it really is not an extremely important piece of code, like any resource – you never know when something comes in handy.

Have you tried it?

Related posts:

  1. Basic HTML Tutorial – What is HTML?
  2. Basic HTML: Using The Anchor Tag For A Page Jump
  3. 8 HTML Mistakes to Avoid

About Nile Flores

Nile is 30 year old female from Southern Illinois. Nile is a mother of 1 son. She is also a web and graphic designer, who exclusively designs using WordPress. She is currently a student working for a Bachelors in Business. She also blogs at WPAddict.net and FamousBloggers.net

Connect with Nile at: Twitter | Facebook | LinkedIn

Nile has written 601 articles at Blondish.net.

Comment Policy

Please do not leave just keywords for your name. You will no longer be approved if you do unless that it is your Intense Debate username. The correct way to leave your name is YOUR NAME @ YOUR KEYWORD if you choose to use a keyword.

Comments (1)

  • Marla says:

    Niles, you're amazing. And, you just happen to post answers to questions I'm asking quite often. <remove the webcam> heh

  • Write a comment

    CommentLuv badge