Skip to content

[Markdown] [ Web/API] Remove id attributes #7899

@wbamberg

Description

@wbamberg

Part of #7898.

In preparation for Markdown, I'd like to remove id attributes in our Web/API docs that are not attached to headings.

There are two main reasons why people do this:

  • to provide a target for a link fragment like https://developer.mozilla.org/en-us/docs/web/api/xmlhttprequest#thing. When removing these it's worth checking to see whether it's being linked internally, and if so, what's the best we can do to make the internal link still go somewhere reasonable. Sometimes we should add a new heading that can be a target (and this improves the page), sometimes we can just link to the nearest heading above. In the CSS docs many internal links were in the immediately preceding section (for values of "Syntax") and I just removed those.

  • on a <div>, to provide a "scope" for an EmbedLiveSample macro call. In these cases we need to replace the <div> with a heading that the EmbedLiveSample call can reference. Usually this makes the pages better, because we're explicitly signalling an example. Sometimes there will be rework/reorganization needed though, because the <div id= is used to pick out a specific set of code blocks among some other code blocks that should not be included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions