CBSE Class 10 Computer Applications Question 26 of 31

Solved Sample Paper 3 — Question 4

Back to all questions
4
Question

Question 22(ii)

Answer the following:

(i) What is the use of dir attribute of <HTML> tag?

(ii) Write the equivalent inline CSS for the following HTML tag.

(a) <body bgcolor = "red">

(b) <img src = "garden.jpg" height = 15 width = 30>

Answer

(i) The dir attribute of HTML tag specifies the direction of an element's text. This attribute can have the values either ltr (left to right) or rtl (right to left). By default, the value of dir attribute is ltr.

(ii) The equivalent inline CSS for the following HTML tags is as follows:

(a) <body style = "background-color: red;">

(b) <img src = "garden.jpg" style = "height: 15px; width: 30px;">