Write a program in HTML to create a Web page insert and image background ?

Write a program in HTML to create a Web page insert and image background ?


 background-image:

  linear-gradient(to bottom, rgba(255,255,0,0.5), rgba(0,0,255,0.5)),

  url('thinkforu.png');


or


<!DOCTYPE html>

<html>

<head>

<style>

p {

  background-image: url('thinkforudotorg.jpg');

}

</style>

</head>

<body>


<h2>Background Image</h2>


<p>You can specify background images<br>

for any visible HTML element.<br>

In this example, the background image<br>

is specified for a div element.<br>

By default, the background-image<br>

will repeat itself in the direction(s)<br>

where it is smaller than the element<br>

where it is specified. (Try resizing the<br>

browser window to see how the<br>

background image behaves.</p>


</body>

</html>

Comments

Last 7 Days

css for code blocks

what is the css code for transparent background

How to use referrerpolicy Attribute value ( strict-origin-when-cross-origin ) with < iframe > tag in HTML ? with example