Computer Applications

Define the following CSS attributes:

(i) outline

(ii) padding

(iii) float

CSS

5 Likes

Answer

(i) outline — An outline attribute defines an outline which is drawn around elements, outside the borders, to make the elements stand out. It is defined in the following way:

outline : [outline-color] [outline-style] [outline-width]

For example,

P   
{
    outline-style : solid;
    outline-color : red;
    outline-width : thin;
}

(ii) padding — Padding attribute defines the inner distance between the border and the content of the element. It is defined in the following way:

H1
{
    padding : 20px 20px 20px 20px ;
}

(iii) float — The float attribute defines the behaviour of floatable elements on an HTML page. The float attribute can have the following values — none, left or right. It is defined in the following way:

img
{
    float : left;
}

Answered By

3 Likes


Related Questions