anyone see a problem with this line of code??

Discussion in 'HTML' started by Mike, Oct 6, 2006.

  1. Mike

    Mike Guest

    Hi all,
    Something seems to be wrong with the following line of code, as my
    email link is not red, even though I specify FF0000:

    <a href="mailto:"><FONT STYLE="font-family:
    comic sans; color:ff0000;">Inquiries, Comments<FONT></a>

    any comments appreciated, thanks-
    Mike
    Mike, Oct 6, 2006
    #1
    1. Advertising

  2. Mike

    freemont Guest

    On Thu, 05 Oct 2006 21:38:08 -0700, Mike wrote:

    > Hi all,
    > Something seems to be wrong with the following line of code, as my email
    > link is not red, even though I specify FF0000:
    >
    > <a href="mailto:"><FONT STYLE="font-family: comic
    > sans; color:ff0000;">Inquiries, Comments<FONT></a>
    >
    > any comments appreciated, thanks-
    > Mike


    It's red here. You're going to catch hell about that markup.

    --
    "Because all you of Earth are idiots!"
    ¯`·.¸¸.·´¯`·-> freemont© <-·´¯`·.¸¸.·´¯
    freemont, Oct 6, 2006
    #2
    1. Advertising

  3. Mike

    dorayme Guest

    In article
    <>,
    "Mike" <> wrote:

    > Hi all,
    > Something seems to be wrong with the following line of code, as my
    > email link is not red, even though I specify FF0000:
    >
    > <a href="mailto:"><FONT STYLE="font-family:
    > comic sans; color:ff0000;">Inquiries, Comments<FONT></a>
    >
    > any comments appreciated, thanks-
    > Mike


    Immediate problem is missing # in front of FF0000.

    #f00;

    Perhaps specify the hover too while at it.

    --
    dorayme
    dorayme, Oct 6, 2006
    #3
  4. Mike

    dorayme Guest

    In article <>,
    freemont <> wrote:

    > On Thu, 05 Oct 2006 21:38:08 -0700, Mike wrote:
    >
    > > Hi all,
    > > Something seems to be wrong with the following line of code, as my email
    > > link is not red, even though I specify FF0000:
    > >
    > > <a href="mailto:"><FONT STYLE="font-family: comic
    > > sans; color:ff0000;">Inquiries, Comments<FONT></a>
    > >
    > > any comments appreciated, thanks-
    > > Mike

    >
    > It's red here. You're going to catch hell about that markup.


    Indeed.

    This is what I would do: have some separate css to style links
    and leave out this font business.

    a {

    color: #f00;
    background: #fff;
    }

    and also style visited (a:visited), hover (a:hover), and active
    (a:active) while at it.

    If you want this/all email link to be something special from
    other links (I would not), you can id/class it/them.

    There... I think I have made up a bit for the previous
    "how's-yer-father" advice...

    --
    dorayme
    dorayme, Oct 6, 2006
    #4
  5. Mike wrote:

    > Something seems to be wrong with the following line of code, as my
    > email link is not red, even though I specify FF0000:
    >
    > <a href="mailto:"><FONT STYLE="font-family:
    > comic sans; color:ff0000;">Inquiries, Comments<FONT></a>


    1: Link text is not the email address so it can't be so easily copy/pasted
    for people who don't have email clients their browsers can activate for
    them (e.g. webmail services)

    2: You use <font>.

    3: You use inline style

    4: Your CSS has syntax errors that the validator would pick up

    5: So does your HTML

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Oct 6, 2006
    #5
  6. Mike

    Brian Cryer Guest

    "Mike" <> wrote in message
    news:...
    > Hi all,
    > Something seems to be wrong with the following line of code, as my
    > email link is not red, even though I specify FF0000:
    >
    > <a href="mailto:"><FONT STYLE="font-family:
    > comic sans; color:ff0000;">Inquiries, Comments<FONT></a>
    >
    > any comments appreciated, thanks-
    > Mike


    The second <FONT> should be </FONT>, otherwise everything else has been
    covered by the other replies to your post.
    --
    Brian Cryer
    www.cryer.co.uk/brian
    Brian Cryer, Oct 6, 2006
    #6
  7. Mike

    Guest

    Mike:

    > <a href="mailto:"><FONT STYLE="font-family:
    > comic sans; color:ff0000;">Inquiries, Comments<FONT></a>


    With no URL, my comments are on this extract only, not how it fits into
    the bigger picture.

    The FONT element is deprecated in HTML4.01 in favour of stylesheets,
    the idea being to separate style from structure. (The reasoning for
    that is explained elsewhere - e.g., in the archives.) You appear to be
    using FONT only as a grouping element, however, not to specify font
    size, colour or face.

    Instead of FONT's own attributes - size, color and face - you're using
    inline styles. Good, but external stylesheets are more powerful, not
    to mention neater, than inline styles in so far as they don't clutter
    the markup with style rules, they are reusable, and they make it
    'easier to manage style on a site basis' (HTML4.01 sec. 14.1).
    Moreover, '[f]or optimal flexibility, authors should define styles in
    external style sheets' (sec. 14.2.2), whatever 'optimal flexibility'
    is!

    http://www.w3.org/TR/html401/present/styles.html

    If you specify the CSS color property, unless you specify the
    background colour too, the contrast between background and foreground
    is unpredictable. Even if you work out the inherited value, there
    could be other stylesheets that override your rule. Legibility is at
    risk.

    http://www.css.nu/articles/CSS-colours.html

    The color property takes a keyword or a numerical RGB specification as
    its value. 'The format of an RGB value in hexadecimal notation is a
    '#' immediately followed by either three or six hexadecimal characters'
    (CSS2.1 sec. 4.3.6). You are missing the <#>, and since 'ser agents
    must ignore a declaration with an illegal value' (sec. 4.2), the color
    is not set to red.

    http://www.w3.org/TR/CSS21/syndata.html#value-def-color

    I would argue that link text should say what the URL points to. At
    first blush I might think that 'Inquiries, Comments' is a link to
    another page of some sort. Mailto URLs are a special case, and the
    received wisdom is to simply repeat the e-mail address as the link
    text. Whether specifying the title attribute is a good idea on mailto
    links, I don't know.

    http://www.w3.org/TR/WCAG10-HTML-TECHS/#link-text

    You are missing a </> from the FONT end-tag, upsetting the nesting.

    While 'comic sans' as a font-family value does not need to be quoted,
    it is a SHOULD condition in CSS2.1.

    Why do you have some generic identifiers (element names) in upper case
    and others in lower case? Consistency aids readability.

    --
    Jock
    , Oct 6, 2006
    #7
  8. Mike

    richard Guest

    "Mike" <> wrote in message
    news:...
    > Hi all,
    > Something seems to be wrong with the following line of code, as my
    > email link is not red, even though I specify FF0000:
    >
    > <a href="mailto:"><FONT STYLE="font-family:
    > comic sans; color:ff0000;">Inquiries, Comments<FONT></a>
    >
    > any comments appreciated, thanks-
    > Mike
    >


    <Font style="font: 'comic sans' #FF0000">comment</font>
    richard, Oct 6, 2006
    #8
  9. Mike

    Mike Guest

    Thanks for all the help everyone, I have a lot to learn.

    Mike
    Mike, Oct 8, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dave
    Replies:
    4
    Views:
    300
  2. Scott Meddows

    Anyone see the error?

    Scott Meddows, Mar 4, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    460
    Scott Meddows
    Mar 5, 2004
  3. Leon

    Does anyone see my mistake?

    Leon, Nov 10, 2004, in forum: ASP .Net
    Replies:
    9
    Views:
    332
  4. Flip
    Replies:
    3
    Views:
    955
    Tony Morris
    Feb 9, 2004
  5. Steve Kershaw
    Replies:
    1
    Views:
    342
    Brennan Stehling
    Sep 26, 2006
Loading...

Share This Page