English

Give an example of a CSS rule.

Advertisements
Advertisements

Question

Give an example of a CSS rule.

Code Writing
Very Short Answer
Advertisements

Solution

div { border: 1px solid black;
      font-size: 18px;
    }

The above example sets the border and font-size CSS properties for all div elements by creating a CSS rule that targets them.

shaalaa.com
  Is there an error in this question or solution?
Chapter 6: Cascading Style Sheets (CSS) - Assisted Practice [Page 272]

APPEARS IN

Sumita Arora Computer Applications [English] Class 10
Chapter 6 Cascading Style Sheets (CSS)
Assisted Practice | Q 4. (iii) | Page 272
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×