Re: Display Source Code - Color Keywords

Discussion in 'HTML' started by Andrew H. Carter, Jun 23, 2003.

  1. On Mon, 23 Jun 2003 01:13:22 +0000 (UTC), Alexander Mac
    <> wrote:

    >I want to present some source code (C++, Java etc) on my page, so I am
    >using <pre><code></code></pre> tags. Is there any way to color the keywords
    >all together? For example, make them appear blue (a CSS maybe?).



    Not sure which program you use for a text editor, but Editpad Lite
    http://www.editpadlite.com can do search & replace and let's say you
    want a certain phrase hightlighted with code, then what you could do
    is highlight the particular phrase and if it occurs more than once,
    click the Find & Replace (CTRL+F) button. The highlighted word/phrase
    is now in the search box, then copy that into the replace portion and
    then edit the code so that it is highlighted and use the Safety
    palette colors:

    <font color="#ffcc00"> if apples and oranges are the same as
    pears</font>

    Then have every instance where it is found replaced with the new
    value. You can have it search from the beginning, or just a paragraph
    or two, whatever you want.

    Sincerely,

    Andrew H. Carter
     
    Andrew H. Carter, Jun 23, 2003
    #1
    1. Advertising

  2. On Mon, 23 Jun 2003 13:31:23 +1000, "Mark Parnell"
    <> wrote:

    >*Please* do not use the deprecated <font> tag. Use CSS. See brucie's
    >answer.
    >
    >BTW: #ffcc00 is not blue ;-)



    Ah, therein lies the crux of the matter, not all browsers do CSS and
    FFCCOO is golden in color, though a more pleasant one is FFFFCC, sort
    of beige, hey it's one of my favorite colors for a background. One
    thing I can't stand is red text on a blue background, talk about pain
    in the eyes.

    Sincerely,

    Andrew H. Carter
     
    Andrew H. Carter, Jun 23, 2003
    #2
    1. Advertising

  3. Andrew H. Carter

    Mark Parnell Guest

    Andrew H. Carter wrote:
    > On Mon, 23 Jun 2003 13:31:23 +1000, "Mark Parnell"
    > <> wrote:
    >
    >> *Please* do not use the deprecated <font> tag. Use CSS. See
    >> brucie's answer.
    >>

    >
    > Ah, therein lies the crux of the matter, not all browsers do CSS


    Still catering for NS 2 are we? Even NS 4 copes with basic CSS as required
    here.

    --

    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Jun 23, 2003
    #3
  4. On Mon, 23 Jun 2003 14:21:50 +1000, "Mark Parnell"
    <> wrote:

    >Still catering for NS 2 are we? Even NS 4 copes with basic CSS as required
    >here.



    I don't like Nutscrape, at least with IE you can see the bookmark
    icons as the webmaster/author designed, not some goofy
    can't-tell-the-difference between one from the other when specified.

    Ever use Lynx, a text only browser, it doesn't do CSS. While I may
    currently be using IE6, I sometimes use Lynx, but since my last
    reformat/reinstall I need to reinstall it. In some respects it is
    faster than Opera and definitely faster than IE. If it ever gets' to
    the mouse stage, or that of being able to send/receive email, I may
    just use that entirely.

    When I first got connected 1998+/- my tool was a Brother GeoBook NB80C
    (which I still have, but it needs to be repaired, even if obsolete, or
    rather not being used now that I have a desktop PC), basically a fancy
    laptop sized organizer: Word processor, Spreadsheet,
    Internet/Email/Fax (outgoing fax only), File Manager, Drawing program,
    Calendar/Scheduler, Adressbook, Scrapbook, Bookreader, Calculator,
    Clock/World Time, To Do list. Only drawback, unless you were to
    install an optional 4 or 10 MB flash memory card, you would be using
    the floppy drive like crazy.

    The Globehopper browser does not do frames, CSS, nor does it do Java
    script, just strict HTML and due to the memory constraints, it can
    handle minimum tables usage before it runs out of memory.

    Sincerely,

    Andrew H. Carter
     
    Andrew H. Carter, Jun 23, 2003
    #4
    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. brucie
    Replies:
    1
    Views:
    1,434
    Jukka K. Korpela
    Jun 23, 2003
  2. Jasper Bedaux
    Replies:
    0
    Views:
    906
    Jasper Bedaux
    Jun 23, 2003
  3. RoboHobby
    Replies:
    14
    Views:
    3,237
    John B. Matthews
    Dec 14, 2008
  4. Kamaljeet Saini
    Replies:
    0
    Views:
    424
    Kamaljeet Saini
    Feb 13, 2009
  5. sed_y
    Replies:
    0
    Views:
    1,021
    sed_y
    Feb 15, 2012
Loading...

Share This Page