#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    4
    Rep Power
    0

    Opening and ending tag mismatch


    Hello, first I would like to say that this site has helped me quite a bit, so thank you.
    Im trying to upload my site on to biz.nf but it keeps giving me an error which is:
    error on line 33 at column 50: Opening and ending tag mismatch: font line 0 and h1
    This is my first site, Im only at my third week of school, never took or did anything that had to do with html. So i apologize if my codes r messy or alot of mistakes, having said that here it is.
    line 32 - <h1 style="margin-top:1.4cm"><FONT FACE="algerian"><font color="#228B22"> HOLLYFOOD</h1></font></font>
    line 33 - </div>
    Here is the whole body code.
    <body>
    <div style ="margin:auto;width:25cm;border:5px solid red;border-styleutset">
    <div style= "height:5cm;width:25cm;background-image:url('title12.jpg'); text-align: center; font-size:213%">
    <h1 style="margin-top:1.4cm"><FONT FACE="algerian"><font color="#228B22"> HOLLYFOOD</h1></font></font>
    </div>
    <div style="height:16cm;width:5cm;margin-top:0cm;background-color:black">
    <FONT FACE="algerian"><font color="#FFFFFF">
    <ul>
    <li><h3><font size="4">MENU</font size></h3></li>
    <li><h2><font size="3">Meals</h2></li>
    <li><h2><font size="3">Deserts</font size></h2></li>
    <li><h2><font size="4">ONLINE ORDER</h2></li>
    <li><h2><font size="4">PHOTO GALLERY</h2></li>
    <li><h2><font size="4">ABOUT US</h2></li>
    <li><h2><font size="4">CONTACT</h2></li>
    <li><h2><font size="4">HOLLYFOOD COOK BOOK</h2></li>
    <li><h2><font size="4">HOME</font size></h2></li>
    </ul>

    </div>
    <div style="height:16cm;width:15cm; ;margin-top:-16cm;margin-left:5cm;background-color:green">
    <h1 align="center"><font size="5">Today's Special</h1></font>
    </div>
    <div style="height:16cm;width:5cm; ;margin-top:-16cm;margin-left: 20cm;background-color:black">
    </div>
    <div style="height:5cm;width:25cm; ;margin-top:0cm;margin-left: 0cm;background-color:yellow;background-image:url('fish.jpg')">
    </div>
    </div>

    </body>

    I appreciate the help.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    4
    Rep Power
    0
    Oh damn I believe I put this thread in the wrong section. Sorry!!
  4. #3
  5. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,904
    Rep Power
    1045
    Wrong section? This is the HTML section.

    Use CODE tags, please:



    Without CODE tags, your code is unformatted character soup with strange smilies in it.

    Right next to the "Submit Reply" button, there's also a "Preview Post" button. Click this button before you click the other one.

    Back to topic:

    The error message tells you everything you need to know: The nesting of the tags is wrong. Now take a close look at that line, and you should see the problem.

    Code:
    <h1 style="margin-top:1.4cm"><FONT FACE="algerian"><font color="#228B22"> HOLLYFOOD</h1></font></font>
    By the way, who taught you to use the font element? That stuff is ancient. It has died out in the late 90s. Nowadays, you use CSS.
    Attached Images
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    4
    Rep Power
    0
    Ok thanks for the info and I appreciate the help. So my code now looks like this
    Code:
    <h1 style="margin-top:1.4cm"><font face="algerian"><font color="#228B22"> HOLLYFOOD</font></font></h1>
    im getting error after error but im working through it.

    The font element codes i found through google.
  8. #5
  9. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,122
    Rep Power
    4258
    Welcome to DevShed Forums, Htmlnoobskii.

    The <font> element is obsolete and has been for quite some time. I recommend you learn how to set styles with CSS.

    http://www.cssbasics.com/
    http://www.css-101.org/
    http://learnlayout.com/
    http://www.htmldog.com/
    http://www.cssnewbie.com/
    W3Fools: A W3Schools Intervention
    BrainJar.com: Using Style Sheets
    http://css.maxdesign.com.au/
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    4
    Rep Power
    0

    Smile


    Thanks, ill definitely look through those sites. Thanks for the info, I appreciate it.

IMN logo majestic logo threadwatch logo seochat tools logo