Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML Problem

Zearkill

New Coder
guys i have a little problem.
I want to minimize this cod
HTML:
<!DOCTYPE html>

<html>

    <head>

        <title>My name</title>

    </head>

    <body>

        <h1 style="color:green" > 1 </h1>

        <h1 style="color:rgb(4, 59, 4)" > 2 </h1>

        <h1 style="color:rgb(120, 241, 195)" > 3 </h1>

        <h1 style="color:rgb(111, 201, 111)" > 4 </h1>

        <h1 style="color:rgb(235, 25, 165)" > 5 </h1>

        <h1 style="color:rgb(200, 221, 10)" > 6 </h1>

        <h1 style="color:rgb(209, 142, 16)" > 7 </h1>

        <h1 style="color:rgb(128, 0, 38)" > 8 </h1>

        <h1 style="color:rgb(120, 30, 204)" > 9 </h1>

        <h1 style="color:rgb(9, 202, 236)" > 10 </h1>

    </body>

</html>
e if possible
 
Hi there,

I would recommend creating a stylesheet.css file and link to it from your HTML document, which will allow you to use CSS without it being in the same document as your HTML code. You can check out this thread about What CSS is, but it briefly goes over external CSS styling. You can also check out this thread which will show you how to link an external CSS file to your HTML file.

I hope this helps!
 
I feel id be able to give a better answer or advice if I knew the actual reason of the question is this being implemented sitewide are you only wanting these colours or the ability to add or adjust them on the fly?? otherwise if this is all you are wanting CSS will be the tidiest way as MALCOM recommended
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom