Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Semantic = Everything in a list

Options
  • 04-02-2010 3:13pm
    #1
    Closed Accounts Posts: 1,619 ✭✭✭


    http://xhtml.com/en/xhtml/reference/pre/

    To be honest I'm a bit baffled by the suggestion that using a list to represent source code is more semantically correct than using the pre tag.

    Sure, you often see source code with line numbers, but I think it's going a bit far to throw it <li> tags around each line.

    If you try to copy and paste the code into notepad you lose the formatting (tabs) and get line numbers beside the code making it worthless.

    Semantic Web 1
    Usability 0


Comments

  • Users Awaiting Email Confirmation Posts: 351 ✭✭ron_darrell


    Personally, I find the pre tag a nightmare to use on a xhtml site. If I was displaying code I'd either use (as you've suggested) a list or a textarea (which makes it easier to copy & paste, keeps your formatting and also means that (especially for very long code segments) that the overall look of the page is not interfered with - no dancing below the fold :) )

    RD


Advertisement