SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can <pre> contain nested tabs?

    Hello! I can't find the answer to this question: is it a valid html to have nested tags inside the <pre></pre> block?

    For example: <pre>my text here<blockquote>something here</blockquote> more text <div class='someclass'>some text inside div</div> more text</pre>

    Is this valid or not?
    My project: Open source Q&A
    (similar to StackOverflow)
    powered by php+MongoDB
    Source on github, collaborators welcome!

  2. #2
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When asking about the basics, one should first read the manual.

    See 9.3.4 Preformatted text: The PRE element. There you will find that it may hold only inline stuff, except for some specific exclusions. So, no, you may not nest a blockquote within pre, but span is ok.

    See Poetry and verse in the html page for examples of usage.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  3. #3
    PHP Guru lampcms.com's Avatar
    Join Date
    Jan 2009
    Posts
    921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you. I'll use span instead of blockquote and hopefull my html will remain valid.
    My project: Open source Q&A
    (similar to StackOverflow)
    powered by php+MongoDB
    Source on github, collaborators welcome!


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
  •