Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anita Hansen 9 posts 49 karma points
    Jan 20, 2015 @ 11:27
    Anita Hansen
    0

    Newbee-question: How to format tags correctly

    Hi,I am new to Umbraco and would like to be sure to format tags correctly from the start. Does it matter how I write them? Should it be in lower case letters?Anita

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 20, 2015 @ 11:50
    Jan Skovgaard
    0

    Hi Anita and welcome to our :)

    What tags do you have in mind? Is it HTML tags? XSLT tags? Or some kind of other tags?

    If it's HTML tags there are no limitation to what HTML version you use or what coding-style/tag-style you're using. Even though the HTML5 doctype allows some pretty liberal usage in order to how tags should be opened and closed I prefer the well-formed way so if you have a ordered list you close the tags in it like this

    <ol>
     <li>Item</li>
     <li>Item</li>
    </ol>
    

    Opposed to

    <ol>
     <li>Item
     <li>Item
    </ol>
    

    When using the HTML5 doctype both of these examples are valid so it's entirely up to you and your preferences. But you should of course always run your code through the validator in order to make sure that you code quality is in order and that you don't struggle with weird issue due to a wrongly named tag or something like that.

    Umbraco does not restrict you to output HTML in a certain way.

    Apart from that I guess that you're probably also interested in learning more about the inner Working of Umbraco - In that case these links are pretty useful as well

    http://our.umbraco.org/documentation/Using-Umbraco/Creating-Basic-Site/ http://24days.in/umbraco/2014/how-to-set-up-an-umbraco-site/

    And it may also be a good idea to sign up for http://umbraco.tv and learn by watching the videos in there.

    Hope this helps.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft