Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove self-closing tags#226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
AA-Turner merged 1 commit intopython:mainfromhugovk:deslash
Apr 7, 2025
Merged

Remove self-closing tags#226

AA-Turner merged 1 commit intopython:mainfromhugovk:deslash
Apr 7, 2025

Conversation

hugovk
Copy link
Member

@hugovkhugovk commentedApr 7, 2025
edited
Loading

Self-closing tags (<tag />) do not exist in HTML.

If a trailing/ (slash) character is present in the start tag of an HTML element, HTML parsers ignore that slash character. This is especially important to remember for elements such as<script> or<ul> that do require a closing tag. In these cases, adding a trailing slash in the start tag does not close the element. Instead, the trailing slash is ignored, and the element is treated as open until an explicit closing tag is encountered or until the parser implicitly closes the element based on the HTML structure and parsing rules. For example, in the case of<div/>Some text, browsers interpret this as<div>Some text</div>, treating the slash as ignored and considering the div element to encapsulate the text that follows.

https://developer.mozilla.org/en-US/docs/Glossary/Void_element#self-closing_tags

Let's omit them: they're ignored, could be misleading (give the false impression they do something when they do not) and are ugly (IMO).


📚 Documentation preview 📚:https://python-docs-theme-previews--226.org.readthedocs.build/

@AA-TurnerAA-Turner merged commite0b4a33 intopython:mainApr 7, 2025
15 checks passed
@hugovkhugovk deleted the deslash branchApril 7, 2025 18:33
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@merwokmerwokmerwok approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@hugovk@merwok@AA-Turner

[8]ページ先頭

©2009-2025 Movatter.jp