13. Embedding Images (<img>)
Images are embedded using the self-closing <img> tag. It requires two mandatory attributes.
13.1 Mandatory Attributes
src(Source): Specifies the path (absolute or relative) to the image file.alt(Alternate Text): Provides a text description of the image. This is vital for accessibility (screen readers) and SEO, and appears if the image fails to load.
html

13.2 Defining Size
While you will primarily use CSS to control image size, you can set the default dimensions using the width and height attributes (in pixels, without the px unit).
html

Best Practice: Always define the width and height for performance reasons. This allows the browser to reserve the space before the image is loaded, preventing layout shifts.