Width and Height
Use the width
and
height
properties to specify the
dimensions of a block-level element or an inline replaced element (like an
image). The width
and height
properties do not
apply to inline text (non-replaced) elements and will be ignored by
standards-conformant browsers. In other words, you cannot specify the
width and height of an anchor (a
) or a
strong
element unless you change its
display role to a block-level display value like block
, list-item
, or inline-block
.
Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.