How do I use internal css styles?



  • An internal CSS style is used within the <head></head> tags of a html document.

    There are countless examples on internet searches.

    For example change the header tag style.

    <h2>This is heading 2</h2>
    

    Within the <head></head> tags.

    ...
    <head>
      <style>
            h2 {
              background-color: pink;
              color: white
            }
    
        </style>
    </head>
    <body>
        <h2>This is heading 2</h2>
    </body>
    

    The result in the browser is:
    6e78c51f-8e8f-4345-a958-5e9c0dd4d092-image.png


Log in to reply
 

© Lightnetics 2024