When setting the color to the button - blue, the button does not change color, the class in my case is b1

.b1 { background: navy; /* Синий цвет фона */ color: white; /* Белые буквы */ font-size: 12pt; /* Размер шрифта в пунктах */ } <input type="button" name="button" class="b1" value="Вычислить" onClick="areaRectangle();"> 
  • And where is the areaRectangle function? - jekaby
  • She did not belong to the topic - Rhem

1 answer 1

Styles must be wrapped in a style tag, or loaded using

 <link rel="stylesheet" type="text/css" href="linkto.css"> 

 <style> .b1 { background: navy; /* Синий цвет фона */ color: white; /* Белые буквы */ font-size: 12pt; /* Размер шрифта в пунктах */ } </style> <input type="button" name="button" class="b1" value="Вычислить" onClick="areaRectangle();"> 

  • Thank you, it worked right - Rem