From c8db3fef4519abf8562678896c6f985ff4a63f64 Mon Sep 17 00:00:00 2001 From: Alex Goldsmith <46906584+alexgoldsmith@users.noreply.github.com> Date: Thu, 17 Jul 2025 16:08:43 -0500 Subject: [PATCH] fix(curriculum): clarify void tag content (#61357) --- .../66f6db08d55022680a3cfbc9.md | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/curriculum/challenges/english/25-front-end-development/lecture-understanding-html-attributes/66f6db08d55022680a3cfbc9.md b/curriculum/challenges/english/25-front-end-development/lecture-understanding-html-attributes/66f6db08d55022680a3cfbc9.md index 1cd703b65b5..4c166e10144 100644 --- a/curriculum/challenges/english/25-front-end-development/lecture-understanding-html-attributes/66f6db08d55022680a3cfbc9.md +++ b/curriculum/challenges/english/25-front-end-development/lecture-understanding-html-attributes/66f6db08d55022680a3cfbc9.md @@ -1,17 +1,12 @@ --- id: 66f6db08d55022680a3cfbc9 title: What Role Does HTML Play on the Web? -challengeType: 11 -videoId: Me-GFJKL-9E +challengeType: 19 dashedName: what-is-html --- # --description-- -Watch the video or read the transcript and answer the questions below. - -# --transcript-- - What Role Does HTML Play on the Web? HTML, which stands for Hypertext Markup Language, is a markup language for creating web pages. When you visit a website and see content like paragraphs, headings, links, images, and videos; that's HTML. HTML represents the content and structure of a webpage through the use of elements. Here's an example of a paragraph element: @@ -36,7 +31,19 @@ What distinguishes an opening tag from a closing tag is the forward slash (`/`) ``` -Notice that this image element does not have the closing tag and it does not have any content. Void elements cannot have any content and only have a start tag. If you wanted to display an image, you will need to include a couple of attributes inside your image element. An attribute is a special value used to adjust the behavior for an HTML element. Here is an example of an image element with a `src`, or source, attribute: +Notice that this image element does not have the closing tag and it does not have any content. Void elements cannot have any content and only have a start tag. + +Sometimes you will see void elements that use a `/` before the `>` like this: + +```html + +``` + +While many code formatters like Prettier, will choose to include the `/` in void elements, the HTML spec states that the presence of the `/` "does not mark the start tag as self-closing but instead is unnecessary and has no effect of any kind". + +In real world development, you will see both forms so it is important to be familiar with both. + +If you wanted to display an image, you will need to include a couple of attributes inside your image element. An attribute is a special value used to adjust the behavior for an HTML element. Here is an example of an image element with a `src`, or source, attribute: ```html @@ -142,7 +149,7 @@ Which of the following is a valid attribute used inside the `img` element? ### --feedback-- -Review the video starting at the `1:37` timestamp where the `img` element and the appropriate attributes were discussed. +Review where the `img` element and the appropriate attributes were discussed. --- @@ -150,7 +157,7 @@ Review the video starting at the `1:37` timestamp where the `img` element and th ### --feedback-- -Review the video starting at the `1:37` timestamp where the `img` element and the appropriate attributes were discussed. +Review where the `img` element and the appropriate attributes were discussed. --- @@ -158,7 +165,7 @@ Review the video starting at the `1:37` timestamp where the `img` element and th ### --feedback-- -Review the video starting at the `1:37` timestamp where the `img` element and the appropriate attributes were discussed. +Review where the `img` element and the appropriate attributes were discussed. ## --video-solution--