Computer Science, asked by manshasatsang, 1 year ago

write a program to change the background and text colour of webpage ​

Answers

Answered by AtulKantsingh
3

Answer:

To specify a background color, use the CSS background-color property. This is used in the same way as the color property, in other words, you can type the name of a color, enter it in hexadecimal notation or again use the RGB method. To specify the web page background color, you have to work with the <body> tag.

Answered by Brainlyshchay
2

You can change the background-color and the font color by adding a simple styling code of CSS which is given below:

<html>

<head>

 <title>Write a programme to change font and background-color | nishchay</title>

 <!-- *Note: You can add any color -->

 <style>

   body {

     background-color: #29B6F6;

     color: #FAFAFA;

   }

 </style>

</head>

<body>

 <center>

   <h1>Your Title goes here</h1>

   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam maximus leo non augue lobortis, a porta enim ultrices. Proin sed laoreet orci. Proin congue libero sit amet leo elementum, quis eleifend purus faucibus. Morbi id augue vel neque accumsan

     molestie sit amet sed mi. Fusce sed massa orci. Etiam elementum in purus eu dignissim. Integer et libero in odio lobortis cursus. Vestibulum euismod, orci ut hendrerit sollicitudin, urna massa varius tortor, non lacinia libero est non nulla.</p>

   <br><br>

   <h1>Hope this help you !</h1>

 </center>

</body>

</html>

Your code will look something like this:

Attachments:
Similar questions