diff --git a/guide/english/html/elements/img-tag/index.md b/guide/english/html/elements/img-tag/index.md index 7b9267a544..2904d8bdf2 100644 --- a/guide/english/html/elements/img-tag/index.md +++ b/guide/english/html/elements/img-tag/index.md @@ -7,17 +7,19 @@ title: Img Tag A simple HTML Image element can be included in an HTML document like this: ```html -this is a cool picture +this is a cool picture ``` `alt` tags provide alternate text for an image. One use of the `alt` tag is for visually impaired people using a screen reader; they can be read the `alt` tag of the image in order to understand the image's meaning. +The `title` attribute is optional and will provide additional information about the image. Most browsers display this information in a tooltip when the user hovers over it. + Note that the path to the image file can be either relative or absolute. Also, remember that the `img` element is self-closing, meaning that it does not close with the `` tag and instead closes with just a single `>`. Example: ```html -my picture +my picture ``` (This is assuming that the html file is at https://example.com/index.html, so it's in the same folder as the image file) @@ -25,9 +27,16 @@ Example: is the same as: ```html -my picture +my picture ``` +Sometimes an element will also use two other attributes to specify its size, `height` and `width`, as shown below: + +```html +my picture +``` + +The values are specified in pixels, but the size is usually specified in CSS rather than HTML. #### More Information: