Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate HTML5 instead of HTML 4.01 #424

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Conversation

jwakely
Copy link
Member

@jwakely jwakely commented Jan 25, 2024

  • Use HTML5 DOCTYPE.
  • Use CSS to style tables instead of obsolete HTML attributes.
  • Use id attributes instead of name. Sanitize the values of all such attributes (and corresponding URLs using them) so that they don't contain spaces.
  • Do not create duplicate id attributes in index pages that aren't sorted by section.
  • Postprocess issues to replace obsolete <tt> elements with <code>.

There are validation errors for some of the issues themselves, due to the use of <p/> as a paragraph break, which is not correct HTML5. Paragraphs should start with <p> and end with </p>, not just be started implictly and then separated by <p/>.

Wrong:

This is paragraph one.
<p/>
This is paragraph two.

Also wrong:

<p>
This is paragraph one.
<p/>
This is paragraph two.
</p>

Right:

<p>
This is paragraph one.
</p>
<p>
This is paragraph two.
</p>

@jwakely
Copy link
Member Author

jwakely commented Jan 25, 2024

There are validation errors for some of the issues themselves, due to the use of <p/> as a paragraph break, which is not correct HTML5. Paragraphs should start with <p> and end with </p>, not just be started implictly and then separated by <p/>.

To be clear, these are pretty harmless. Browsers do the right thing. It's only a problem if you're using https://validator.w3.org and trying to get rid of all warnings and errors.

- Use HTML5 DOCTYPE.
- Use CSS to style tables instead of obsolete HTML attributes.
- Use `id` attributes instead of `name`. Sanitize the values of all such
  attributes (and corresponding URLs using them) so that they don't
  contain spaces.
- Do not create duplicate `id` attributes in index pages that aren't
  sorted by section.
- Postprocess issues to replace obsolete `<tt>` elements with `<code>`.

There are validation errors for some of the issues themselves, due to
the use of `<p/>` as a paragraph break, which is not correct HTML5.
Paragraphs should start with `<p>` and end with `</p>`, not just be
started implictly and then separated by `<p/>`.

Wrong:

	This is paragraph one.
	<p/>
	This is paragraph two.

Also wrong:

	<p>
	This is paragraph one.
	<p/>
	This is paragraph two.
	</p>

Right:

	<p>
	This is paragraph one.
	</p>
	<p>
	This is paragraph two.
	</p>
@jwakely jwakely merged commit e9169ce into cplusplus:master Jan 29, 2024
2 checks passed
@jwakely jwakely deleted the html5 branch January 29, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant