Core Code
Modern Dev Handbook
☰
HTML Contents
✕
HTML Guide
HTML Home
HTML Introduction
HTML Editors
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML Colors
HTML CSS
HTML Links
HTML Images
HTML Favicon
HTML Page Title
HTML Tables
HTML Lists
HTML Block & Inline
HTML Div
HTML Classes
HTML Id
HTML Buttons
HTML Iframes
HTML JavaScript
HTML File Paths
HTML Head
HTML Layout
HTML Responsive
HTML Computercode
HTML Semantics
HTML Style Guide
HTML Entities
HTML Symbols
HTML Emojis
HTML Charsets
HTML URL Encode
HTML vs. XHTML
Forms
HTML Forms
HTML Form Attributes
HTML Form Elements
HTML Input Types
HTML Input Attributes
Input Form Attributes
Graphics
HTML Canvas
HTML SVG
Media
HTML Media
HTML Video
HTML Audio
HTML Plug-ins
HTML YouTube
Web APIs
HTML Web APIs
HTML Geolocation
HTML Drag and Drop
HTML Web Storage
HTML Web Workers
HTML SSE
HTML
→
HTML Images
Image Width and Height
Example setting image width and height.
Preview
Code
<img src="https://via.placeholder.com/300x150" width="300" height="150" alt="Sized Image">
More HTML Images Examples (11)
Basic Image
Image Alt Text
Image as Link
Responsive Image
Centered Image
Image Border
Image with Caption
Floating Image
Simple Image Gallery
Lazy Loading Image
Picture Element Example
← Basic Image
Image Alt Text →