Search code examples
htmlcsslabel

How to style labels in a css file


Home Read Here

I made four labels in my HTML code with different texts. But I don't know how to specifically pick one to style in my css file.


Solution

  • Unable to help fully without seeing your code but I would say apply an id="name_of_element" to each text element.

    Then in you .css file use #id-name-here to apply styling to each text element individually.

    #element_id_here {
        color: blue;
        font-weight: 600;
        padding: 5px;
        margin-top: 10px;
    }
    

    You can change the parameters to suite your needs but these are just an example.