concept
replaced-element — CSS reference
A replaced element delegates rendering of its object content to a separate resource or implementation. An image may provide natural dimensions and a natural aspect ratio that inform CSS layout. CSS sets the outer box and can control how the object fits inside it; ordinary child text layout is not used for the image itself.
Formal Syntax & Structure
css syntaxcss
<img src="…" alt="…">Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS sizing and overflow lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#a{display:block}</style><body><img id="a" alt="Teal rectangle" src="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27120%27 height=%2760%27%3E%3Crect width=%27120%27 height=%2760%27 fill=%27teal%27/%3E%3C/svg%3E"></body></html>