When creating a Web document, what format is used to express an image's height…
2013
When creating a Web document, what format is used to express an image's height and width?
- A.
Centimeters
- B.
Pixels
- C.
Dots per inch
- D.
Inches
Attempted by 9 students.
Show answer & explanation
Correct answer: B
Concept: On the web, an image is rendered as a grid of tiny coloured squares called pixels. The browser maps an image's dimensions onto the physical screen using these pixels, so a web document expresses an image's height and width as a count of pixels (px) — the device-independent unit understood natively by HTML and CSS.
Application: When the height/width attributes of an <img> tag (or the width/height CSS properties) are set, the value is read as a number of pixels. Writing width="200" means the image occupies 200 pixels across the viewport — it does not refer to any real-world length on screen.
Contrast: The other units are physical/print measures, not the web rendering unit:
Centimeters — a metric length used for print/physical layout, not how a browser sizes an on-screen image.
Dots per inch — a resolution/print-density figure (how many ink dots fit in an inch); it describes print quality, not on-screen image dimensions.
Inches — an imperial physical length, again a print/real-world measure rather than the screen unit.
Result: A web document expresses an image's height and width in pixels.