fix(challenges): Remove self-closing slashes from <img> and <input> (#16985)
parent
fc87d71af3
commit
ff35f2c9c3
|
@ -558,13 +558,13 @@
|
|||
"description": [
|
||||
"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.",
|
||||
"An example of this would be:",
|
||||
"<code><img src=\"https://www.your-image-source.com/your-image.jpg\" /></code>",
|
||||
"Note that in most cases, <code>img</code> elements are self-closing.",
|
||||
"<code><img src=\"https://www.your-image-source.com/your-image.jpg\"></code>",
|
||||
"Note that <code>img</code> elements are self-closing.",
|
||||
"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.",
|
||||
"Note: If the image is purely decorative, using an empty <code>alt</code> attribute is a best practice.",
|
||||
"Ideally the <code>alt</code> attribute should not contain special characters unless needed.",
|
||||
"Let's add an <code>alt</code> attribute to our <code>img</code> example above:",
|
||||
"<code><img src=\"https://www.your-image-source.com/your-image.jpg\" alt=\"Author standing on a beach with two thumbs up.\" /></code>",
|
||||
"<code><img src=\"https://www.your-image-source.com/your-image.jpg\" alt=\"Author standing on a beach with two thumbs up.\"></code>",
|
||||
"<hr>",
|
||||
"Let's try to add an image to our website:",
|
||||
"Insert an <code>img</code> tag, before the <code>h2</code> element.",
|
||||
|
@ -1287,7 +1287,7 @@
|
|||
"Now let's create a web form.",
|
||||
"Input elements are a convenient way to get input from your user.",
|
||||
"You can create a text input like this:",
|
||||
"<code><input type=\"text\" /></code>",
|
||||
"<code><input type=\"text\"></code>",
|
||||
"Note that <code>input</code> elements are self-closing.",
|
||||
"<hr>",
|
||||
"Create an <code>input</code> element of type <code>text</code> below your lists."
|
||||
|
|
Loading…
Reference in New Issue