What am I doing wrong? Invalid markup question

Discussion in 'Web Design and Development' started by montanachad, Oct 7, 2008.

  1. montanachad macrumors regular

    montanachad

    Joined:
    Jul 7, 2008
    Location:
    Helena, Montana and Lacey, Washington
    #1
    Code:
     <a href="http://www.theadvocates.org/quizp/index.html"><img
        src="quizanimation.gif" style="border: none;” alt="Where do you stand" /></a>
    This element gives me 4 validation errors. For the life of me, I can't figure out what I'm doing wrong! :eek:

    link
     
  2. montanachad thread starter macrumors regular

    montanachad

    Joined:
    Jul 7, 2008
    Location:
    Helena, Montana and Lacey, Washington
    #2
    I fixed it, but there's still a warning. I used the base tag in the img element and deleted the inline style.:cool:

    So what's with this warning?

    The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.
     
  3. design-is macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #3
    I'm no expert, but your code is:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
    <meta name="generator" content="BBEdit 9.0" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    
    And mine is:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    

    Mine validates fine, so maybe just jig it around? I can't really offer any more suggestions lol sorry

    Or maybe its to do with the xml bit at the top?
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    It's like it says, Unicode with BOM is less supported. In BBEdit, at the bottom of the window, switch it to "Unicode (UTF-8, no BOM)" and re-save to fix the issue. I've come across it before.
     

Share This Page