CSS Multiple choices


Total available count: 25
Subject - Web Development
Subsubject - CSS

How do you make each word in a text start with a capital letter?


 

 

 

 



C


Solution:-

The capitalization of text within an element changes by the text-transform property, or else directs the user agent to leave the capitalization "as is."

none - The capitalization of the element's text should not be altered.
uppercase − All of the characters in the element's text should be in uppercase (capital letters).
lowercase − All of the characters in the element's text should be in lowercase.
capitalize − The first letter of each word in the element's text should be capitalized.

DOM Syntax:-

object.style.textTransform = "capitalize";

Example:
Following is the example which demonstrates how to set the cases for a text using the text-transform property.

<html>
 <head>
 </head>
 <body>
   <p style = "text-transform:capitalize;">
    The text Slightbook will be capitalized
   </p>
  
   <p style = "text-transform:uppercase;">
    The text Slightbook will be in uppercase
   </p>
  
   <p style = "text-transform:lowercase;">
    The text Slightbook will be in lowercase
   </p>
 </body>
</html>

 




Next 5 multiple choice(s)

1

Which property is used to change the font of an element?

2

How do you make the text bold?

3

How do you display a border like this:
The top border = 10 pixels
The bottom border = 5 pixels
The left border = 20 pixels
The right border = 1pixel?

4

Which property is used to change the left margin of an element?

5

When using the padding property; are you allowed to use negative values?

Comments