Horje
How to change body Background Color HTML Style

The CSS background-color property defines the background color for an HTML element.


Sample of code about Background Color HTML Body Style

Set the background color for a page to powderblue:
<body style="background-color:powderblue;">

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>

Full Example of Background Color HTML Body Style

Here is used the code on full html page.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body style="background-color:powderblue;">

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

Output should be:

Full Example of Background Color HTML Body Style





Related Articles
What is HTML Styles HTML Styles
How to create HTML Style Attribute HTML element HTML Styles
How to change body Background Color HTML Style HTML Styles
How to change Background Color of <h1> and <p> Elements HTML Styles
How to change Text Color HTML Styles
How to change Fonts Family of Text with HTML <h1> <p> HTML Styles
How to change Text Size with HTML <h1> and <p> HTML Styles
How to create Text Alignment HTML Styles
How to create HTML CSS Border HTML Styles
How to create HTML CSS Padding HTML Styles
How to create HTML CSS Margin HTML Styles

Single Articles
Sample of code about Background Color HTML Body StyleHTML Styles
Full Example of Background Color HTML Body StyleHTML Styles

Read Full:
HTML Styles
Category:
Web Tutorial
Sub Category:
HTML Styles
Uploaded by:
Admin
Views:
234


Reffered: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_styles_background-color