Results 1 to 5 of 5

Thread: HTML warnings

  1. #1
    3 Star Lounger
    Join Date
    May 2003
    Location
    Mid-Cheshire, England
    Posts
    275
    Thanks
    1
    Thanked 3 Times in 3 Posts

    HTML warnings

    Using FrontPage 2003 I have been tidying up my site at: http://www.sandiwaygolf.co.uk/ and have checked the pages in the public area with the Mozilla HTML Tidy add-on for Firefox for errors and warnings.

    Two warnings have baffled me as I cannot understand their meaning or cause despite searching for and reading jargon that's above my head! The two warnings are:

    Warning: <a> cannot copy name attribute to id from the code:
    <font size="3" color="#336666" face="Trebuchet MS"><a name="Contact Information">Contact Information</a></font><font face="Trebuchet MS">[b]<font size="2">
    As `name' is deprecated I tried `id' without success.

    and Warning: <a> escaping malformed URI reference from the code:
    <a href="playingthecourse.html#Care of the Course">
    This is a `Bookmark' to another page and I haven't tried to correct it.

    I'd be glad to receive a pointer to a clear explanation and correction for these warnings. In the meantime my task is ongoing and I have hopes of using even more CSS to improve the maintenance of the site.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: HTML warnings

    Hi Malcolm

    Looking at the page code , indeed name is depricated and therefore cannot be used.

    I cannot see the code for Contact Information inside the style tages. If you are to use it I suggest you do it as one word with a hash(#) infront of it to designate it as an ID like so
    <pre>#contactinfo a {
    color: #BF0D62;
    background: white;
    font-weight: bold;
    text-decoration: none;
    }</pre>


    The code will then look like this:
    <pre><div id="contactinfo">
    <a>Contact Information</a>
    </div>
    </pre>


    Just as a note of caution, I am not a lover of the ID as this means it can only be used once and is best used for form elements which need unique identities. I would use class and the syntax would look like this:

    <pre>.contactinfo a {
    color: #BF0D62;
    background: white;
    font-weight: bold;
    text-decoration: none;
    }</pre>


    The code will then look like this:
    <pre><div class="contactinfo">
    <a>Contact Information</a>
    </div>
    </pre>


    Subtle difference but better if you have more thn one area on the page that needs contact information or similar repetitive requirements.

    As for the second error, it maybe because the page is relative to the root foler and not the page you are working on, try:

    <a href="/playingthecourse.html#Care of the Course">

    ...and also as the pedant is in me get rid of those nasty spaces in the bookmark, which maybe another cause <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Jerry

  3. #3
    3 Star Lounger
    Join Date
    May 2003
    Location
    Mid-Cheshire, England
    Posts
    275
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Re: HTML warnings

    IMO - Pedancy is no bad thing when it comes to HTML and CSS.

    I'm sure you know but for clarity the spaces you refer to are the result of how bookmarks are created in FrontPage. They are hyperlinks to a particular subheading on another page. The subheadings of the child page are listed as links on the mother page. If the spaces are deleted then on the child page Care of the Course would have to appear as CareoftheCourse; hardly an aid to ease of reading. As I am moving the site from FrontPage to Dreamweaver this problem will be eventually overcome.

    Thank you for the suggestions you made - I will try them out as I get time in furthering the overhaul of the site.

    Malcolm

  4. #4
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: HTML warnings

    No problems.

    Just for the discussion in reference to bookmarks, I was trying to find an example and then I realised you can see it on my site at
    http://www.magicforest.co.uk/jezzano.htm. If you look at the source code of the page I use

    <pre><ul> [*]Phi and Fossils [*]The Fibonacci Sequence
    [*]Phi[*]Fun with Phi [*]Lightning maths[*]Sinful Eleven [*]Pi to a thousand places [/list]
    </pre>


    To identify the bookmarks within the page and then where the bokmarks are:

    <pre><h2><a name="phi" id="phi"></a>Phi</h2></pre>


    I have used name here in conjunction with the id as they are successfully validated as I am using Transitional XHTML. In Dreamweaver you mark a bookmark by using Ctrl+Alt+A and then you type in the name you want. I have an inkling that Frontpage sees, a link name such as "Care of the Course" and then lazily uses that string value as the bookmark....uuuurrrgghh the puritan in me comes out here and makes my scalp itch <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Anyway Bookmarks can be called anything you want as long as the <a> tag matches the href attribute in the link. So in short the bookmark id does not have to be the same as the link text. Just remember to name them something contextual like my example of phi, pi or fib so that you can recognise them in the future. My <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>

    BTW. I rememeber your website when you first started it and I have to say it is looking pretty impressive now
    Jerry

  5. #5
    3 Star Lounger
    Join Date
    May 2003
    Location
    Mid-Cheshire, England
    Posts
    275
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Re: HTML warnings

    My site? Impressive? You ain't seen nutting - yet!

    But thank you for the kind words; it's nice for me to be told I've improved. Believe it or not the SGC site was started in FrontPage 97 and has survived FP98, FP2000 and now it is being made ready for the 21st century in FP2003. That's endurance for you!

    I've noted what you say about bookmarks and DW for future reference - thank you again for your assistance.

    Malcolm

Posting Permissions

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