Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Semantic = Everything in a list

  • 04-02-2010 03: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