Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions coding-standards/html.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,6 @@ This will ensure that the resource is downloaded rather than opened. This works
<a download href="/downloads/offline.zip">offline version</a>
```

### Omit Boolean Attribute Value

**Bad**
```html
<audio autoplay="autoplay" src="/audio/theme.mp3">
<input type="text" disabled="disabled" name="txtFirstName">
```

**Good**
```html
<audio autoplay src="/audio/theme.mp3">
<input type="text" disabled name="txtFirstName">
```

### Do Not Use `id` Attribute Unnecessarily
Unless needed avoid giving ID attributes to every element that you create.

Expand All @@ -205,6 +191,7 @@ A boolean attribute is one that needs no declared value. XHTML required you to d
<select>
<option value="1" selected="true">1</option>
</select>
<audio autoplay="autoplay" src="/audio/theme.mp3">
Copy link

@coderabbitai coderabbitai bot Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Include closing </audio> tag to stay aligned with the “Do Not Omit Closing Tags” rule

The examples add an <audio> element without its mandatory closing tag, which contradicts the guideline stated earlier in the same document (“Do Not Omit Closing Tags”, line 109).
Updating both “Bad” and “Good” snippets keeps the examples self-consistent and avoids signalling that <audio> is a void element (it is not).

-<audio autoplay="autoplay" src="/audio/theme.mp3">
+<audio autoplay="autoplay" src="/audio/theme.mp3"></audio>-<audio autoplay src="/audio/theme.mp3">
+<audio autoplay src="/audio/theme.mp3"></audio>

Also applies to: 204-204

🤖 Prompt for AI Agents
In coding-standards/html.md at lines 194 and 204, the <audio> elements are
missing their mandatory closing </audio> tags, which violates the "Do Not Omit
Closing Tags" guideline. Add the closing </audio> tags to both the "Bad" and
"Good" example snippets at these lines to ensure consistency and correct HTML
syntax.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xixas perhaps we don't need to make this change. Let me know if this can be resolved without any changes

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

```

**Good**
Expand All @@ -214,6 +201,7 @@ A boolean attribute is one that needs no declared value. XHTML required you to d
<select>
<option value="1" selected>1</option>
</select>
<audio autoplay src="/audio/theme.mp3">
```

### Forms
Expand Down