05-the-browser-and-the-dom
12-css-efficient-selectors
22-fonts-colors-animations
25-css-var-minification-html-validation
27-nesting-layers-container
29-collaborate-with-uiux-designer
Folders and files Name Name Last commit message
Last commit date
parent directory Aug 24, 2024
View all files
You can read the img
spec in HTML spec .
Categories:
Flow content.
Phrasing content.
Embedded content,
Form-associated element.
If the element has a usemap attribute: Interactive content.
Palpable content.
Contexts in which this element can be used:
Where embedded content is expected.
As a child of a picture
element, after all source elements.
Content model: Nothing.
It represents an image.
Common attributes:
src
: Address of the resource.
alt
: Replacement text for use when images are not available. This is a must and behaves as if I wanna replace the image with a text.
In CSS images are replaced elements . Simply put they are elements that are outside of the CSS formatting model scope.
Images have natural dimensions; it is when we ain't specifying neither width
or height
.
If you specify only one of them (width
or height
) then it will keep the ratio in a way that your image won't loss its original shape.
You can’t perform that action at this time.