|
558 | 558 | "description": [
|
559 | 559 | "You can add images to your website by using the <code>img</code> element, and point to a specific image's URL using the <code>src</code> attribute.",
|
560 | 560 | "An example of this would be:",
|
561 |
| - "<code><img src=\"https://www.your-image-source.com/your-image.jpg\" /></code>", |
562 |
| - "Note that in most cases, <code>img</code> elements are self-closing.", |
| 561 | + "<code><img src=\"https://www.your-image-source.com/your-image.jpg\"></code>", |
| 562 | + "Note that <code>img</code> elements are self-closing.", |
563 | 563 | "All <code>img</code> elements <strong>must</strong> have an <code>alt</code> attribute. The text inside an <code>alt</code> attribute is used for screen readers to improve accessibility and is displayed if the image fails to load.",
|
564 | 564 | "Note: If the image is purely decorative, using an empty <code>alt</code> attribute is a best practice.",
|
565 | 565 | "Ideally the <code>alt</code> attribute should not contain special characters unless needed.",
|
566 | 566 | "Let's add an <code>alt</code> attribute to our <code>img</code> example above:",
|
567 |
| - "<code><img src=\"https://www.your-image-source.com/your-image.jpg\" alt=\"Author standing on a beach with two thumbs up.\" /></code>", |
| 567 | + "<code><img src=\"https://www.your-image-source.com/your-image.jpg\" alt=\"Author standing on a beach with two thumbs up.\"></code>", |
568 | 568 | "<hr>",
|
569 | 569 | "Let's try to add an image to our website:",
|
570 | 570 | "Insert an <code>img</code> tag, before the <code>h2</code> element.",
|
|
1287 | 1287 | "Now let's create a web form.",
|
1288 | 1288 | "Input elements are a convenient way to get input from your user.",
|
1289 | 1289 | "You can create a text input like this:",
|
1290 |
| - "<code><input type=\"text\" /></code>", |
| 1290 | + "<code><input type=\"text\"></code>", |
1291 | 1291 | "Note that <code>input</code> elements are self-closing.",
|
1292 | 1292 | "<hr>",
|
1293 | 1293 | "Create an <code>input</code> element of type <code>text</code> below your lists."
|
|
0 commit comments