Insert a PNG with an <img> element whose src points to the image URL and whose alt describes the image (or is empty when the image is decorative): <img src='images/example.png' alt='A concise description of the image'>. The PNG must be available at that URL from the page being served.
The basic PNG image tag
At the location where the image should appear, add an <img> element:
<img src='images/logo.png' alt='Acme company logo'>
src is a URL, not a command that uploads a file. The browser requests that URL and displays the response if it is a valid, supported image. The .png suffix by itself does not put a file on your site; the file must exist where your server, static host or content system can return it.
A complete page example
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>PNG example</title>
</head>
<body>
<h1>Product logo</h1>
<img src='images/logo.png' alt='Acme company logo' width='640' height='360'>
</body>
</html>
Put the PNG where the browser can request it
Upload or copy the image into a directory served by your website, then make the src path match that location exactly. Check spelling, capitalization and folder placement; paths that differ only by letter case can fail on some hosts.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstall#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Relative paths
A relative URL is resolved from the URL of the HTML document (or from the document’s base URL if one is declared). If the page is /about/team.html and the file is /about/images/team.png, use:
<img src='images/team.png' alt='The product team'>
If the image is one directory above the page, use ../:
<img src='../images/team.png' alt='The product team'>
For an image at the site’s root, an absolute-path URL beginning with / is often clearer:
<img src='/images/team.png' alt='The product team'>
Absolute URLs
You can reference an image hosted at another address:
<img src='https://cdn.example.com/assets/chart.png' alt='Bar chart comparing monthly sales'>
Use an absolute URL only when that host is intended to serve the file publicly and reliably. If the host requires a login, blocks hotlinking or removes the file, the browser cannot display it.
Check the URL before debugging HTML
- Copy the exact value of
srcinto a browser tab. - Confirm the image loads at that address without a login.
- Compare every directory name, character, extension and letter case with the actual file.
- Make sure the file is complete and is a supported PNG, not an empty or corrupt upload.
Write useful alternative text
The alt attribute is the image’s equivalent content for people who cannot see or load it. Describe the information or function that matters in the surrounding context, rather than repeating a filename.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Informative images
<img src='images/sales-chart.png' alt='Bar chart comparing monthly sales from January through June'>
Keep the wording concise but specific enough to convey the point of the image. You normally do not need to begin with “image of” or “picture of.”
Decorative images
If the PNG adds no information and is purely visual decoration, use an empty value:
<img src='images/ornament.png' alt=''>
Do not omit alt. An empty value tells assistive technology to ignore the decorative image, while an omitted attribute can leave users without a clear alternative.
Images that are links
When an image is the only content inside a link, its alternative text should communicate the link’s destination or action:
<a href='/account'>
<img src='images/avatar.png' alt='Open your account'>
</a>
If nearby text already supplies the same information, avoid making a screen reader announce it twice.
Reserve the correct space with width and height
When the intrinsic pixel dimensions are known, include matching width and height attributes:
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
<img src='images/chart.png' alt='Bar chart comparing monthly sales' width='640' height='360'>
These values describe the file’s intrinsic dimensions, not necessarily the final CSS size. They let the browser calculate the aspect ratio and reserve space before the image finishes loading, reducing content movement.
Make a PNG responsive
For a fluid layout, constrain the rendered width while preserving the ratio:
<img src='images/example.png' alt='Description of the image' width='1200' height='800' style='max-width: 100%; height: auto;'>
For a site-wide rule, place the equivalent in a stylesheet:
img {
max-width: 100%;
height: auto;
}
Do not set unrelated fixed width and height values that distort the image. If you intentionally crop an image, use an appropriate CSS object-fit rule in a container instead of stretching the PNG.
Choose between one file, responsive candidates and art direction
The right markup depends on how many image variants you maintain and whether the image itself changes by viewport.
| Approach | Use it when | Markup | Trade-off |
|---|---|---|---|
| Single file | One resolution is sufficient for every display | src plus alt |
Simplest maintenance; every device receives the same resource |
| Responsive candidates | You have several resolutions of the same composition | srcset and sizes |
More files to maintain, but the browser can choose a suitable resource |
| Art direction | The crop or composition should change at a breakpoint | <picture> with <source> elements and a fallback <img> |
Maximum control, with separate artwork and conditions to manage |
Use srcset and sizes for different resolutions
When the image content is the same but you have multiple widths, list candidates with width descriptors. The sizes value tells the browser how wide the image is expected to render in each layout condition:
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
<img
src='images/photo-800.png'
srcset='images/photo-400.png 400w, images/photo-800.png 800w, images/photo-1200.png 1200w'
sizes='(max-width: 600px) 100vw, 800px'
width='1200'
height='800'
alt='Hiker standing beside a mountain lake'>
The fallback src remains important for browsers and situations that do not use the candidate list. The width descriptors identify resource widths; they do not force the image to render at that width.
Use picture for art direction
Use <picture> when a mobile crop should be different from the desktop artwork:
<picture>
<source media='(max-width: 600px)' srcset='images/hero-mobile.png'>
<source media='(min-width: 601px)' srcset='images/hero-desktop.png'>
<img src='images/hero-desktop.png' alt='People collaborating around a table' width='1600' height='900'>
</picture>
The nested <img> supplies the fallback and carries the alternative text. Use srcset alone when only resolution changes; use picture when the desired image itself changes.
Control sizing and loading in CSS
Keep intrinsic dimensions in the HTML and use CSS for the layout size. A class is easier to maintain than repeated inline styles:
.content-image {
display: block;
max-width: 100%;
height: auto;
}
If an image is far below the initial viewport, loading='lazy' can defer its request until it is near view. Do not lazy-load an image that is needed immediately at the top of the page; delaying a key image can make the first view feel slower.
Troubleshoot a PNG that does not appear
Broken-image icon or missing image
- Open the exact
srcURL directly. A 404 or other failed response means the problem is hosting or the path, not the<img>syntax. - Check capitalization, spelling, directory depth and the actual extension.
- Confirm the URL is not empty and that the uploaded file is intact and supported by the browser.
- If the image is on another host, verify that the host permits public access and has not removed or renamed the file.
Image is unexpectedly huge
Set a CSS display width and keep height: auto so the aspect ratio is preserved:
Recommended Free Tools
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
.article-image {
width: 100%;
max-width: 800px;
height: auto;
}
Image looks stretched or squashed
Remove conflicting fixed dimensions or make the HTML attributes match the PNG’s real intrinsic dimensions. If the design requires a crop, place the image in a sized container and choose an intentional object-fit behavior instead of forcing both dimensions on the image.
Content jumps while the PNG loads
Add accurate intrinsic width and height attributes. The browser can then reserve the correct ratio before bytes arrive.
Only one responsive candidate ever loads
Check the width descriptors in srcset and the rendered slot described by sizes. A wrong sizes value can make the browser choose a resource that does not match the real layout. Also verify that each candidate URL works independently.
Validation checklist
- The PNG is stored in a directory or host that serves it publicly.
- The
srcvalue is the exact URL, including correct case. - Informative images have concise, contextual
alttext. - Decorative images use
alt=''. - Linked images describe the link’s destination or action.
- Intrinsic
widthandheightmatch the file’s pixel dimensions when known. - CSS keeps the image within its container without changing its ratio.
srcset/sizesare used only when you maintain real candidate files, andpictureis reserved for art direction.
Or skip the browser setup
If the PNG you need is a screenshot of a web page rather than an existing local asset, ScreenshotNeo can return a page capture through one request. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; bot checks, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
See the parameter reference in the ScreenshotNeo documentation. The following calls use the supplied endpoint and can be adapted by changing the target URL:
cURL
curl -G 'https://api.screenshotneo.com/v1/shot' -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
import requests
r = requests.get('https://api.screenshotneo.com/v1/shot', params={'access_key': 'YOUR_API_KEY', 'url': 'https://stripe.com'}, timeout=90)
open('shot.webp', 'wb').write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
The service supports PNG, JPEG, WebP and PDF output; use the format controls documented for your request, then save the returned file and point your HTML src at its served URL. Free usage includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots, and every feature is available on every plan. Create a free ScreenshotNeo account.
FAQ
Can I place the same PNG in several HTML pages?
Yes. Each page can use the same publicly served URL in its src; keep the alternative text appropriate to the image’s meaning on that particular page.
Should I use srcset for a logo?
Use a single file when the logo has one practical resolution and size. Add responsive candidates only when you actually maintain multiple resolutions and want the browser to select among them.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Frequently Asked Questions
Can I place the same PNG in several HTML pages?
Yes. Reuse the same publicly served URL in each page’s src, while writing alt text that fits the image’s role in that page’s context.
Should I use srcset for a logo?
Use one file when one practical resolution is enough. Add responsive candidates only when you maintain multiple resolutions and want the browser to choose among them.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

