Home
HTML
HTML Background Image
Example 3: HTML Background Image
Run ❯❯
<!DOCTYPE html> <html> <head> <title>p Background Image Example</title> <style> p {background-image: url('trees.jpg'); } </style> </head> <body> <h1>p background Image Example</h1> <p>We have specified<br> the background image for<br> paragrah in head section using style element.<br> We can also use<br> style attribute for setting<br> background image.</p> </body> </html>