The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other HTML color change [creates a border]

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #241328

    There is a way to style the HTML tag itself.

    They have this at

    Remove the 3 lines in the html element

    Put any color inside the single quotes below and run it… = ”;

    …and it works.

    Now, when I use this code in my own html page, it doesn’t work. But it works on fiddle

    (How did I get this to work in my own page?)

    Another way is to attach a CSS to the element to a JavaScript and use:

    function swapStyleSheet(sheet) onclick=".getElementById('pagestyle').setAttribute('href',sheet)">

    The latter works; but I would have to add a different CSS for each color.

    The thing is about styling the HTML tag, is it creates a border; I saw this on another site; and the page looks so freaking cool!

    What else can be done to do this? I’d like to save space by not attaching a separate page for every element. I’m looking at something to do with onclick.

    I have used inline JS for my other options (
    page color used:


    , font color used


    , and font size used:


    ) and each has worked.


    Hmmm this all seems rather deja vu-y.

    Are you @LIP_lostinprogramming per chance?

    It’s just that your conversation style (wandering off the OP’s original topic like this, timing (when the other account stops posting and a new account springs up), topic choices (character sets, colour backgrounds, style switches, building an information website) and the fact that you’re referring to a JS function name “swapStyleSheet” that we’ve already seen used in the website, all points to you being the same person.

    It’s probably better to use one account in future. Disagreements with moderators happen but hiding behind an alias afterwards seems less honest than working through it.


    That’s where I got my idea from


    There is a way to style the HTML tag itself.

    Of course…it’s called CSS.

    It’s an element like any other.


Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Other’ is closed to new topics and replies.