Computer Applications
Which one of the following is a correct statement?
- h1 {font-weight:bold; font-family:Arial;color:red}
- h1 {font weight; bold; fontfamily: Arial; color: red}
- h1 {font-weight; bold; font-family;Arial;color;red
- None of these
Answer
h1 {font-weight:bold; font-family:Arial;color:red}
Reason — This above statement specifies that the text within <h1> elements should have a bold font-weight, use the Arial font family, and have red text color. The format with a colon (:) is used to assign property-value pairs in CSS. Options 2 and 3 have incorrect syntax with missing colons and semicolons, making them invalid CSS statements. Option 4 is not applicable because option 1 is the correct statement.
Related Questions
A …………… is the name of the HTML element to which a style is applied.
- Tag
- Element
- Selector
- None of these
Name the selector that works like a wild card character and is used to match and apply a style to all the elements on a web page.
- Wild card
- Universal
- Static
- None of these
Which tag is used to create an embedded or internal style sheet?
- Color>
- <Style
- <Type>
- <PRE>
Which of the following characters are used to add comments in CSS?
- #
<!--- //
- None of these