Skip to content

Exhaustively list the attributes accepted by the <a> element. - #335

Merged
davidcarlisle merged 1 commit into
mainfrom
mathml-a-attributes
Jul 27, 2026
Merged

davidcarlisle merged 1 commit into
mainfrom
mathml-a-attributes

Conversation

@fred-wang

Copy link
Copy Markdown
Contributor

See #312

@fred-wang

Copy link
Copy Markdown
Contributor Author

cc @davidcarlisle @lukewarlow @eerii @tannal

Probably, the section needs further improvements but at least this exhaustively list the attributes copied from HTML <a> so we can reference them by other specs.

@lukewarlow

Copy link
Copy Markdown
Member

Does this repo not have PR Preview setup?

@fred-wang

Copy link
Copy Markdown
Contributor Author

Does this repo not have PR Preview setup?

I don't think so. Probably @davidcarlisle knows.

@fred-wang

Copy link
Copy Markdown
Contributor Author

HTML output I get:

<div class="header-wrapper"><h3 id="x3-6-linking-a"><bdi class="secno">3.6<!---0.725386%--> </bdi>Linking <code>&lt;a&gt;</code></h3><a class="self-link" href="#the-a-element" aria-label="Permalink for Section 3.6"></a></div>
        
        <p>
            The
            <dfn class="element" data-dfn-type="element" id="dfn-a" tabindex="0" aria-haspopup="dialog" data-export="">a</dfn>
            element is used to group together any number of sub-expressions equivalently
	    to <code><a data-xref-type="element" data-link-type="element" href="#dfn-mrow" class="internalDFN" id="ref-for-dfn-mrow-25">mrow<!---0.725386%--></a></code>. It's main purpose is to enable the specification fo hyperlinks
	    via the use of the <code>href</code> attribute.
          </p>
          <p>
            The <code>&lt;a&gt;</code> element accepts the attributes described
            in <a href="#global-attributes" class="sec-ref"><bdi class="secno">2.1.3 </bdi>Global Attributes</a> as well as corresponding attributes of the
            <a data-cite="HTML#the-a-element" href="https://html.spec.whatwg.org/multipage/#the-a-element">HTML <code>&lt;a&gt;</code> element</a>:
          </p>
           <ul id="a-attributes">
            <li><code><a data-xref-type="element-attr" data-xref-for="a" data-link-type="element-attr" data-link-for="a" href="#dfn-href" class="internalDFN" id="ref-for-dfn-href-1">href<!---0.725386%--></a></code></li>
            <li><code><a data-xref-type="element-attr" data-xref-for="a" data-link-type="element-attr" data-link-for="a" href="#dfn-target" class="internalDFN" id="ref-for-dfn-target-1">target<!---0.725386%--></a></code></li>
            <li><code><a data-xref-type="element-attr" data-xref-for="a" data-link-type="element-attr" data-link-for="a" href="#dfn-download" class="internalDFN" id="ref-for-dfn-download-1">download<!---0.725386%--></a></code></li>
            <li><code><a data-xref-type="element-attr" data-xref-for="a" data-link-type="element-attr" data-link-for="a" href="#dfn-ping" class="internalDFN" id="ref-for-dfn-ping-1">ping<!---0.725386%--></a></code></li>
            <li><code><a data-xref-type="element-attr" data-xref-for="a" data-link-type="element-attr" data-link-for="a" href="#dfn-rel" class="internalDFN" id="ref-for-dfn-rel-1">rel<!---0.725386%--></a></code></li>
            <li><code><a data-xref-type="element-attr" data-xref-for="a" data-link-type="element-attr" data-link-for="a" href="#dfn-hreflang" class="internalDFN" id="ref-for-dfn-hreflang-1">hreflang<!---0.725386%--></a></code></li>
            <li><code><a data-xref-type="element-attr" data-xref-for="a" data-link-type="element-attr" data-link-for="a" href="#dfn-type" class="internalDFN" id="ref-for-dfn-type-1">type<!---0.725386%--></a></code></li>
            <li><code><a data-xref-type="element-attr" data-xref-for="a" data-link-type="element-attr" data-link-for="a" href="#dfn-referrerpolicy" class="internalDFN" id="ref-for-dfn-referrerpolicy-1">referrerpolicy<!---0.725386%--></a></code></li>
          </ul>
          <p>
            The
            <dfn class="element-attr" data-dfn-type="element-attr" id="dfn-href" tabindex="0" aria-haspopup="dialog" data-export="">href</dfn>,
            <dfn class="element-attr" data-dfn-type="element-attr" id="dfn-target" tabindex="0" aria-haspopup="dialog" data-export="">target</dfn>,
            <dfn class="element-attr" data-dfn-type="element-attr" id="dfn-download" tabindex="0" aria-haspopup="dialog" data-export="">download</dfn>,
            <dfn class="element-attr" data-dfn-type="element-attr" id="dfn-ping" tabindex="0" aria-haspopup="dialog" data-export="">ping</dfn>,
            <dfn class="element-attr" data-dfn-type="element-attr" id="dfn-rel" tabindex="0" aria-haspopup="dialog" data-export="">rel</dfn>,
            <dfn class="element-attr" data-dfn-type="element-attr" id="dfn-hreflang" tabindex="0" aria-haspopup="dialog" data-export="">hreflang</dfn>,
            <dfn class="element-attr" data-dfn-type="element-attr" id="dfn-type" tabindex="0" aria-haspopup="dialog" data-export="">type</dfn> and
            <dfn class="element-attr" data-dfn-type="element-attr" id="dfn-referrerpolicy" tabindex="0" aria-haspopup="dialog" data-export="">referrerpolicy</dfn>
            attributes have the same syntax and semantics as defined for the
            <a data-cite="HTML#the-a-element" href="https://html.spec.whatwg.org/multipage/#the-a-element">HTML <code>&lt;a&gt;</code> element</a>.
          </p>
	  <p> The layout algorithm of the <code>&lt;a&gt;</code> element
          is the same as the <code>&lt;mrow&gt;</code> element.</p>


        ```

@davidcarlisle

Copy link
Copy Markdown
Collaborator

Does this repo not have PR Preview setup?

no, well all bigger PR have been done via a fork with gh-pages running on the fork to allow preview, but smaller ones done from a branch here we haven't needed anything so far.

@davidcarlisle
davidcarlisle merged commit f37caab into main Jul 27, 2026
3 checks passed
@davidcarlisle
davidcarlisle deleted the mathml-a-attributes branch July 27, 2026 17:30
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.

3 participants