How do you make each word in a text start with a capital letter?
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>
Which property is used to change the font of an element?
How do you make the text bold?
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?
Which property is used to change the left margin of an element?
When using the padding property; are you allowed to use negative values?