Computer Science, asked by abhay3762, 1 year ago

How to insert background color in html using notepad?

Answers

Answered by StormAngler
0
Notepad is just a text editor. In order to insert background colour in an HTML page, you need to fetch the HTML code of the page and insert a CSS statement in it.

For example, in the source code of index.html, insert the following to change the background to red.

<style>
* {
background: 'red';
}
</style>

Here, the * represents the entire webpage. The background is a keyword in CSS. The value can be in words, like in the example above or in hexadecimal ('#ff0000'). In hexadecimal, the first two are for red, the next for green and the last two for blue. Each doublet can be from 00 to FF.
Similar questions