Horje
How to change Background Color of <h1> and <p> Elements

Set background color for two different elements:


Sample of code about Background Color of <h1> and <p> Elements

<h1 style="background-color:powderblue;">This is a heading</h1>
<p style="background-color:tomato;">This is a paragraph.</p>

Full Example of Background Color about <h1> and <p> Elements

Set background color for two different elements:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1 style="background-color:powderblue;">This is a heading</h1>
<p style="background-color:tomato;">This is a paragraph.</p>

</body>
</html>

Output should be:

Full Example of Background Color about <h1> and <p> Elements





Category:
Web Tutorial
Sub Category:
HTML Styles
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference