SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What does <pre> do and mean?

    Hi

    I have been looking at the box model at http://www.glish.com/css/7.asp

    in his source code he has a tag <pre> what is this?

  2. #2
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Preformatted text.

  3. #3
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Which means it will render it as you type it, very much like (in fact I believe identically to) the [code ] function on this site.

    It defaults to a weird monospaced font if I recall correctly.

    Where in usual html, anything other than one space is ignored by the browser, anything between the <pre></pre> tags is taken into account.

    To illustrate, I am going to type the same thing twice.

    I like onions!

    Now in spite of the fact I just added ten spaces to the above, it looks normal. However, whack exactly the same thing in <pre></pre> tags:

    Code:
    I like          onions!
    And magically it pays attention to my whitespace.

    ...that's it really




    Edit:

    For the record, I don't really like onions.....unless they're incinerated in a fry up...
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  4. #4
    SitePoint Evangelist mumford1's Avatar
    Join Date
    Sep 2002
    Location
    UK
    Posts
    573
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    me too!..thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •