How can you apply CSS style using ID value?What are selectors in CSS?Can you exp

  1. profile image61
    yahyarajputposted 3 months ago

    How can you apply CSS style using ID value?What are selectors in CSS?Can you explain CSS box model?.

    1.So let’s say you have a HTML paragraph tag with id “mytext” as shown in the below snippet.You can create a style using “#” selector with the “id” name and apply the CSS value to the paragraph tag.
    2.Selectors help to select an element to which you want to apply a style. For example below is a simple style called as ‘intro” which applies red color to background of a HTML element.
    3.CSS box model is a rectangular space around a HTML element which defines border, padding and margin.Border: - This defines the maximum area in which the element will be contained. We can make the border visible,

 
working