Computer Applications

Which one of the following is a correct statement?

  1. h1 {font-weight:bold; font-family:Arial;color:red}
  2. h1 {font weight; bold; fontfamily: Arial; color: red}
  3. h1 {font-weight; bold; font-family;Arial;color;red
  4. None of these

CSS

3 Likes

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.

Answered By

1 Like


Related Questions