1. Welcome to DNTrade. If you want to find out about the latest domain name industry news or talk, share, learn, buy, sell, trade or develop domain names - then you've come to the right place. It's a diverse and active community, with domain investors, web developers and online marketers - and it's free! Click here to join now.
    Dismiss Notice

Code Question

Discussion in 'Web Development' started by DnEbook, Jul 31, 2014.

  1. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,341
    Likes Received:
    838
    I am having a little fun today trying to learn some html and to my surprise most of it is working ….kinda cool. But after the part where i do a heading two piece of text "This is a heading two word in italic" the text stays in H2, even if i add <p> and </p> to the ordered list below? I have tried a few variations but have not been able to crack it as yet and thought i may ask here instead. I have 'bolded' the problem area and would love to get some advice. It's not the end of the world but would be handy to know, many thanks !!

    <html>


    <head>

    <title> This Is Fun To Try </title>



    </head>


    <body>

    <h1 align="center"> Von Roddy </h1>

    <p> This is a
    <strong> strong word </strong>
    </p>

    <p> This is not a strong word.
    <i> It is italic </i>
    </p>

    <h2><i> This is a heading two word in italic </i></p>

    <ol>
    <li> line one </l1>
    <li> Line two </l2>
    </ol>



    <ul><p>
    <li> line one </li>
    <li> line two </p></li>


    <table border="1">
    <tr><td> first square but with wider text</td><td> second square </td>
    <tr><td> third square </td><td> forth square </td>
    </table>



    </body>

    </html>
     
  2. eBranding.com.au

    eBranding.com.au Membership: VIP

    Joined:
    Apr 6, 2011
    Messages:
    980
    Likes Received:
    553
    auDA Member:
    Yes
    You're missing the closing tag for the unordered list:

    </ul>
     
  3. eBranding.com.au

    eBranding.com.au Membership: VIP

    Joined:
    Apr 6, 2011
    Messages:
    980
    Likes Received:
    553
    auDA Member:
    Yes
    Also, the ordered list isn't quite right, it should be:

    <ol>
    <li> line one </li>
    <li> Line two </li>
    </ol>
     
  4. eBranding.com.au

    eBranding.com.au Membership: VIP

    Joined:
    Apr 6, 2011
    Messages:
    980
    Likes Received:
    553
    auDA Member:
    Yes
    Missing closing tag for header, should be:

    <h2><i> This is a heading two word in italic </i></h2>
     
  5. eBranding.com.au

    eBranding.com.au Membership: VIP

    Joined:
    Apr 6, 2011
    Messages:
    980
    Likes Received:
    553
    auDA Member:
    Yes
    Hope that helps! ;)
     
  6. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,341
    Likes Received:
    838
    Just tried that, no change other than the table below moving a little, many thanks

    <ul><p>
    <li> line one </li>
    <li> line two </p></li>
    </ul>
     
  7. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,341
    Likes Received:
    838
    Sorry but i missed about 3 quick posts you just did
     
  8. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,341
    Likes Received:
    838
    Hey fantastic !! …..problem solved, may have to slow down a little but fun to try, cheers !
     
  9. eBranding.com.au

    eBranding.com.au Membership: VIP

    Joined:
    Apr 6, 2011
    Messages:
    980
    Likes Received:
    553
    auDA Member:
    Yes
    Yeah I probably should have just put it in one post... I was multitasking at the time, so as I was scanning your code I was posting issues as I spotted them

    No worries :)
     
  10. petermeadit

    petermeadit Membership: VIP

    Joined:
    Jul 13, 2012
    Messages:
    893
    Likes Received:
    153
    auDA Member:
    Yes
    having fun with HTML... :)

    It might also help to be careful how you nest your tags. Some code might work, but will give errors and cause problems on different browsers.

    Here you have a mixed the tags nesting.

    <ul><p>
    <li> line one </li>
    <li> line two </p></li>
    </ul>

    Would be better like this

    <p>
    <ul>
    <li> line one </li>
    <li> line two </li>
    </ul>
    </p>

    Anyways have fun.
     
  11. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,341
    Likes Received:
    838
    Thanks Pete …it's all learning, just happy to gain an understanding
     
  12. findtim

    findtim Membership: VIP

    Joined:
    Dec 13, 2011
    Messages:
    7,464
    Likes Received:
    1,637
    auDA Member:
    Yes
    its GREAT to learn these basics and so everyone creating a website should.

    if you build a website using wordpress all these small issues are " a button "

    you can then still go and look at the code and go " ohhhh, i get it "

    thats how i learnt and still learning, i am ALWAYS using spare domains to experiment before implementing.

    TODAY, i had a problem in wordpress, stuffed me up for an hour and " it was a button setting " s^^T happens.

    my BIGGEST hint would be if you are going do more ( and this is a hint for all who didn't know how to fix the issue ) IS, record this info and everything else you do because if you don't you will have to say to yourself " F.... tim told me to record it "

    because in 6 months time you will go " hmmmm, i had that problem and solved WTF did i do to fix it " ? :D


    tim
     
  13. eBranding.com.au

    eBranding.com.au Membership: VIP

    Joined:
    Apr 6, 2011
    Messages:
    980
    Likes Received:
    553
    auDA Member:
    Yes
    This is very good advice.

    I have a simple system that I use to record changes and fixes that are made to my sites. Often a problem is solved or a cool new feature is developed that I can then roll out across a number of my sites.

    Also very handy if you're upgrading the platform, theme etc and you need to rework some custom code to play nice with the new version - always a lot easier when you have the exact details of what changes were made, where and why they were made.
     
  14. findtim

    findtim Membership: VIP

    Joined:
    Dec 13, 2011
    Messages:
    7,464
    Likes Received:
    1,637
    auDA Member:
    Yes
    "commenting out " ( search google ) is another good thing to do when making changes ESPECIALLY in your CSS

    tim
     
  15. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,341
    Likes Received:
    838
    Well this is just a first try at html via a youtube video (bookmarked for reference) so i am not going to be too hard on myself. Two things that have stuck from this thread is to 'close off' a line of code and also i thought pete's comment about the 'nest of code' was interesting. Yes of course your advice is also handy tim, don't worry i wont curse you. One way to remember the mistake is to colour code the mistake. 'Remember to close off' is what really has stuck. Hey it's friday so all is good !
    ~
    I thought it was interesting that video made reference to lower case and capitols being a problem with some browsers, is lower case coding better as a rule of thumb?
    ~
    Thanks
     
  16. johno69

    johno69 Membership: VIP

    Joined:
    Nov 29, 2008
    Messages:
    2,666
    Likes Received:
    423
    auDA Member:
    Yes
    Yes
     
  17. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,341
    Likes Received:
    838
    Cheers
     
  18. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,341
    Likes Received:
    838
    I thought i might ask why do i see code tabbed/indented ?
     
  19. Ash

    Ash Membership: Trader

    Joined:
    Dec 21, 2010
    Messages:
    1,145
    Likes Received:
    63
    Pretty sure it's just so it's easier for you to read Spacey.
     
  20. findtim

    findtim Membership: VIP

    Joined:
    Dec 13, 2011
    Messages:
    7,464
    Likes Received:
    1,637
    auDA Member:
    Yes
    indenting makes it easy to see where things start and stop eg: tables

    you will also learn a lot from using firefox with FIREBUG, it will show you what the CSS is controlling

    get it as its free then get onto youtube for some tutorials as it will save you HEAPSSSS of time once you know it.

    tim