Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Pre vs. Code

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 314
    Comment on it

    <code> use for inline code it can wrap and <pre> for block code that must not wrap so, new lines and spaces get rendered as new lines..

    It is little mystified by the <pre> and <code> tags. If youre not sure which to use and when, here's somthing for you

    <pre> You should use <pre> when you need to display text exactly as you typed it with all spaces, tabs, and carriage and then that will returns preserved.

    <code> It is designates a fragment of computer code according to the W3C.

    You're free to do this how you want. It's not recommended by the W3C in any way, however, I personally recommend you to use <pre><code>

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: