Horje
How to create Background Image with CSS Style

You can also specify the background image in the <style> element, in the <head> sectio


Full Example of Background Image with HTML CSS Style

Specify the background image in the <style> element:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
p {
  background-image: url('https://itupto.com/avatar.png');
}
</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>

Output should be:

Full Example of Background Image with HTML CSS Style





Related Articles
What is HTML Background Images HTML Background Images
How to create Background Image with HTML Style HTML Background Images
How to create Background Image with CSS Style HTML Background Images
How to add HTML Background Image on Full Page HTML Background Images
How to create HTML Background Repeat HTML Background Images
How to create HTML Background with no Repeat HTML Background Images
How to add HTML Background Cover with CSS HTML Background Images
How to create HTML Background Stretch HTML Background Images

Single Articles
Full Example of Background Image with HTML CSS StyleHTML Background Images

Read Full:
HTML Background Images
Category:
Web Tutorial
Sub Category:
HTML Background Images
Uploaded:
1 year ago
Uploaded by:
Admin
Views:
73



Share on: