fix(curriculum): update examples formatting in review-html block (#64476)

This commit is contained in:
Viraj Jadhav
2025-12-11 23:05:02 +01:00
committed by GitHub
parent afd6746b9a
commit 2874cd85ab
@@ -63,7 +63,7 @@ Review the concepts below to prepare for the upcoming prep exam.
## Importance of Semantic HTML
- **Structural hierarchy for heading elements**: It is important to use the correct heading element to maintain the structural hierarchy of the content. The `h1` element is the highest level of heading and the `h6` element is the lowest level of heading.
- **Presentational HTML elements**: Elements that define the appearance of content. Ex. the deprecated `center`, `big`, and `font` elements.
- **Presentational HTML elements**: Elements that define the appearance of content, e.g., the deprecated `center`, `big`, and `font` elements.
- **Semantic HTML elements**: These elements provide meaning to the structure of the content. Examples include:
- `<header>`: Represents introductory content.
- `<nav>`: Contains navigation links.
@@ -110,7 +110,7 @@ Review the concepts below to prepare for the upcoming prep exam.
```
- **`input` element**: used to create an input field for user input.
- **`type` attribute**: used to specify the type of input field. Ex. `text`, `email`, `number`, `radio`, `checkbox`, etc.
- **`type` attribute**: used to specify the type of input field, e.g., `text`, `email`, `number`, `radio`, `checkbox`.
- **`placeholder` attribute**: used to show a hint to the user to show them what to enter in the input field.
- **`value` attribute**: used to specify the value of the input. If the input has a `button` type, the `value` attribute can be used to set the button text.
- **`name` attribute**: used to assign a name to an input field, which serves as the key when form data is submitted. For radio buttons, giving them the same `name` groups them together, so only one option in the group can be selected at a time.
@@ -172,7 +172,7 @@ Review the concepts below to prepare for the upcoming prep exam.
</form>
```
- **`button` element**: used to create a clickable button. A button can also have a `type` attribute, which is used to control the behavior of the button when it is activated. Ex. `submit`, `reset`, `button`.
- **`button` element**: used to create a clickable button. A button can also have a `type` attribute, which controls the behavior of the button when it is activated, e.g., `submit`, `reset`, `button`.
```html
<button type="button">Show Form</button>
@@ -292,7 +292,7 @@ Review the concepts below to prepare for the upcoming prep exam.
- **Accessibility and Tables**: When using tables, you should use the `th` element to define header cells and the `td` element to define data cells. This helps assistive technologies understand the structure of the table.
- **Importance for inputs to have an associated label**: You should use the `label` element to associate labels with form inputs. This helps assistive technologies understand the purpose of the input.
- **Importance of good `alt` text**: You should use the `alt` attribute to provide a text alternative for images. This helps assistive technologies understand the content of the image.
- **Importance of good link text**: You should use descriptive link text to help users understand the purpose of the link. This helps assistive technologies understand the purpose of the link.
- **Importance of good link text**: You should use descriptive link text to help users understand the purpose of the link.
- **Best practices for making audio and video content accessible**: You should provide captions and transcripts for audio and video content to make it accessible to people with hearing impairments. You should also provide audio descriptions for video content to make it accessible to people with visual impairments.
- **`tabindex` attribute**: Used to make elements focusable and define the relative order in which they should be navigated using the keyboard. It is important to never use the `tabindex` attribute with a value greater than 0. Instead, you should either use a value of 0 or -1.
- **`accesskey` attribute**: Used to define a keyboard shortcut for an element. This can help users with mobility impairments navigate the website more easily.