Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: W3C stumper

  1. #1
    Join Date
    Apr 2012
    Location
    Central New Jersey
    Posts
    286
    Thanks
    95
    Thanked 3 Times in 3 Posts

    Default W3C stumper

    Hi Folks,

    I've managed fairly well on my own for a while, but now find myself stumped over what may be a ridiculously easy question: W3C will not validate the following:

    HTML Code:
    <p title="Unauthorized Practice of Immigration Law">A separate statute devotes itself to unauthorized practice of <i>immigration</i> law.  That separate statute is N.J.S. 2C:21-31.  As with N.J.S. 2C:21-22, violation of N.J.S. 2C:21-31 can be either a third degree or fourth degree crime, depending on the particular circumstances of the case.</p>
    The full page in question is: http://www.marainlaw.com/page.php?he...orizedpractice.

    Assistance humbly sought.

    Best,

    A.

    P.S. Happy New Year, all.

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    http://validator.w3.org/check?uri=ht...e&group=0&ss=1

    According to the source as identified by the validator, you have an <i> and </i> formatting inside of an image tag (in the alt text). Remove those and see how it improves things.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. The Following User Says Thank You to Beverleyh For This Useful Post:

    marain (01-09-2013)

  4. #3
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    ...validate it as what?

    and is there a specific error it gives you?

    Edit:
    Quote Originally Posted by Beverleyh View Post
    According to the source as identified by the validator, you have an <i> and </i> formatting inside of an image tag (in the alt text)...
    actual source code of <p> in question:
    HTML Code:
    <p title="What Constitutes “Unauthorized Practice of Law?”">Determining whether a particular activity constitutes unauthorized practice of law is often difficult.  The practice of law encompasses much more than conduct of litigation in the courts.  It includes actions for <a href="http://www.marainlaw.com/bottomline.php"><img border="2" src="images/unauth1.jpg" alt="criminal defense lawyer in New Jersey for unauthorized practice of law.  Note that an additional New Jersey statute specifically deals with unauthorized practice of <i>immigration law</i>.  That statute is N.J.S. 2C:21-31." width="160" height="240" class="left" /></a>which legal knowledge, training, skill and ability are required. Loosely speaking, advice to clients, and all actions taken for them in matters connected with the law, constitute practice of law. That includes work performed outside of a court.  It includes actions having no immediate relation to proceedings in court.</p>
    A commonly understood textual representation of italicized text is to surround the phrase with underscores, e.g.,
    Code:
    practice of _immigration law_.
    Last edited by traq; 01-09-2013 at 09:25 PM.

  5. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    There's nothing wrong with that line, because this validates (try it):
    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" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <meta name="description" content="Unauthorized Practice Law New Jersey" />
    <meta name="classification" content="lawyer, federal, criminal, attorney, NJ, New Jersey, DWI, trial, appeal, juvenile, crime" />
    <meta name="extra" content="Counsellors at Law who go that extra mile for their clients." />
    <meta name="distribution" content="Global" />
    <title></title>
    </head>
    <body>
    <p title="Unauthorized Practice of Immigration Law">A separate statute devotes itself to unauthorized practice of <i>immigration</i> law.  That separate statute is N.J.S. 2C:21-31.  As with N.J.S. 2C:21-22, violation of N.J.S. 2C:21-31 can be either a third degree or fourth degree crime, depending on the particular circumstances of the case.</p>
    </body>
    </html>

  6. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by molendijk View Post
    There's nothing wrong with that line, because this validates...
    Correct.

    Problem is (as Beverlyh pointed out), the code the OP quoted in their post is only a fragment of a larger document
    ...and is not the line that is actually producing the validation error.

  7. #6
    Join Date
    Apr 2012
    Location
    Central New Jersey
    Posts
    286
    Thanks
    95
    Thanked 3 Times in 3 Posts

    Default

    Beverley, that was it. Thank you!

    Seeing the solution, I don't feel quite so inadequate. It does not strike me as that obvious. I salute your acumen.

    A.
    Last edited by marain; 01-10-2013 at 12:03 AM. Reason: To correct misspelling of Beverley's name

  8. #7
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Quote Originally Posted by Beverleyh View Post
    http://validator.w3.org/check?uri=ht...e&group=0&ss=1

    According to the source as identified by the validator, you have an <i> and </i> formatting inside of an image tag (in the alt text). Remove those and see how it improves things.
    Hi again peeps,

    Can I just check that we're all talking about the same thing - the img inside of the paragraph that has italic text in the alt value, like this?;
    Code:
    <img border="2" src="images/unauth1.jpg" alt="criminal defense lawyer in New Jersey for unauthorized practice of law.  Note that an additional New Jersey statute specifically deals with unauthorized practice of <i>immigration law</i>.  That statute is N.J.S. 2C:21-31." width="160" height="240" class="left" />
    that's what the validator is flagging on line 57.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  9. #8
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Ha, ha - I've got some serious sausage-fingers going on with this iPhone keyboard. I am so slow tonight - i can't keep up!

    Glad you/we got it sorted
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  10. #9
    Join Date
    Apr 2012
    Location
    Central New Jersey
    Posts
    286
    Thanks
    95
    Thanked 3 Times in 3 Posts

    Default

    Hi Traq,

    Beverley found the problem. I'm still not quite sure why I can't italicize within alt tags, but so be it.

    Best,

    A.

  11. #10
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by marain View Post
    I'm still not quite sure why I can't italicize within alt tags, but so be it.
    why you can't do it:
    Attribute values must be text (not HTML - you can nest elements inside other elements [subject to rules, of course], but not inside a tag - that's what messes up the parser).

    why the rules are that way:
    Attributes are "metadata," not content: therefore, there are no semantics, nor any reason to apply formatting.

    If you want to display an attribute value to the user (and the browser's default formatting does not suit your taste), you need to grab the value via javascript and apply your formatting + presentation that way.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •