header-logo

CODE WITH FAHIM

HTML Images



HTML images are used to display pictures on a webpage — like adding spice to plain text! 🍜

The <img> tag is what makes it happen. It’s short for “image,” and it tells the browser, “Hey, show this picture right here.”

Here’s the basic format:

<img src="image.jpg" alt="Description of image">







Background Image:



A background image is an image set behind the content of a webpage or a specific HTML element — kind of like wallpaper on your phone.

Example:
<!DOCTYPE html> <html>
<body>
<p style="background-image: url("sky.jpg")></p>
<h1>Welcome to My Website</h1>
<p>Enjoy the view 😎</p>
</body>
<html>


Output:

Welcome to My Website

Enjoy the view 😎