Skip to content

Commit

Permalink
[Markdown] Fix unconvertible <dl> elements in HTML (mdn#8963)
Browse files Browse the repository at this point in the history
* Fix unconvertible <dl> elements in HTML

* Update files/en-us/web/html/element/area/index.html

Co-authored-by: Jean-Yves Perrier <[email protected]>

* Update files/en-us/web/html/attributes/rel/index.html

Co-authored-by: Jean-Yves Perrier <[email protected]>

Co-authored-by: Jean-Yves Perrier <[email protected]>
  • Loading branch information
wbamberg and teoli2003 authored Sep 16, 2021
1 parent a6ef369 commit a6a663d
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 74 deletions.
15 changes: 2 additions & 13 deletions files/en-us/web/html/attributes/rel/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -329,19 +329,8 @@ <h2 id="Values">Values</h2>
<h3 id="Non-standard_values">Non-standard values</h3>

<dl>
<dt>apple-touch-icon-precomposed</dt>
<dd>
<pre class="brush: html"> &lt;!-- third-generation iPad with high-resolution Retina display: --&gt;
  &lt;link rel="apple-touch-icon-precomposed" sizes="144x144" href="/static/img/favicon144.e7e21ca263ca.png"&gt;
  &lt;!-- iPhone with high-resolution Retina display: --&gt;
  &lt;link rel="apple-touch-icon-precomposed" sizes="114x114" href="/static/img/favicon114.d526f38b09c5.png"&gt;
  &lt;!-- first- and second-generation iPad: --&gt;
  &lt;link rel="apple-touch-icon-precomposed" sizes="72x72" href="/static/img/favicon72.cc65d1d762a0.png"&gt;
  &lt;!-- non-Retina iPhone, iPod Touch, and Android 2.1+ devices: --&gt;
  &lt;link rel="apple-touch-icon-precomposed" href="/static/img/favicon57.de33179910ae.png"&gt;
  &lt;!-- basic favicon --&gt;
  &lt;link rel="icon" href="/static/img/favicon32.7f3da72dcea1.png"&gt;</pre>
</dd>
<dt>{{htmlattrdef("apple-touch-icon")}}</dt>
<dd>Specifies the icon for a web application on an iOS device.</dd>
</dl>

<h2 id="Browser_compatibility">Browser compatibility</h2>
Expand Down
3 changes: 1 addition & 2 deletions files/en-us/web/html/element/a/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ <h2 id="Attributes">Attributes</h2>

<dl>
<dt id="download">{{HTMLAttrDef("download")}}</dt>
<dd>Prompts the user to save the linked URL instead of navigating to it. Can be used with or without a value:</dd>
<dd>
<dd><p>Prompts the user to save the linked URL instead of navigating to it. Can be used with or without a value:</p>
<ul>
<li>Without a value, the browser will suggest a filename/extension, generated from various sources:
<ul>
Expand Down
10 changes: 3 additions & 7 deletions files/en-us/web/html/element/area/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ <h2 id="Attributes">Attributes</h2>
<dt>{{htmlattrdef("alt")}}</dt>
<dd>A text string alternative to display on browsers that do not display images. The text should be phrased so that it presents the user with the same kind of choice as the image would offer when displayed without the alternative text. This attribute is required only if the {{htmlattrxref("href", "area")}} attribute is used.</dd>
<dt>{{htmlattrdef("coords")}}</dt>
<dd>The <code>coords</code> attribute details the coordinates of the <code><a href="#attr-shape">shape</a></code> attribute in size, shape, and placement of an <code>&lt;area&gt;</code>.</dd>
<dd>
<dd><p>The <code>coords</code> attribute details the coordinates of the <code><a href="#attr-shape">shape</a></code> attribute in size, shape, and placement of an <code>&lt;area&gt;</code>.</p>
<ul>
<li><code>rect</code>: the value is <code><var>x1,y1,x2,y2</var></code>. Value specifies the coordinates of the top-left and bottom-right corner of the rectangle.<br>
For example: <code>&lt;area shape="rect" coords="0,0,253,27" href="#" target="_blank" alt="Mozilla"&gt;</code> The coords in the above example specify: 0,0 as the top-left corner and 253,27 as the bottom-right corner of the rectangle.</li>
Expand Down Expand Up @@ -97,18 +96,15 @@ <h2 id="Attributes">Attributes</h2>
<dd>For anchors containing the {{htmlattrxref("href", "area")}} attribute, this attribute specifies the relationship of the target object to the link object. The value is a space-separated list of <a href="/en-US/docs/Web/HTML/Link_types">link types values</a>. The values and their semantics will be registered by some authority that might have meaning to the document author. The default relationship, if no other is given, is void. Use this attribute only if the {{htmlattrxref("href", "area")}} attribute is present.</dd>
<dt>{{htmlattrdef("shape")}}</dt>
<dd>The shape of the associated hot spot. The specifications for HTML defines the values <code>rect</code>, which defines a rectangular region; <code>circle</code>, which defines a circular region; <code>poly</code>, which defines a polygon; and <code>default</code>, which indicates the entire region beyond any defined shapes.</dd>
<dd>Many browsers, notably Internet Explorer 4 and higher, support <code>circ</code>, <code>polygon</code>, and <code>rectangle</code> as valid values for {{htmlattrxref("shape", "area")}}, but these values are non-standard.</dd>
<dt>{{htmlattrdef("target")}}</dt>
<dd>A keyword or author-defined name of the {{Glossary("browsing context")}} to display the linked resource.</dd>
<dd>The following keywords have special meanings:
<dd>A keyword or author-defined name of the {{Glossary("browsing context")}} to display the linked resource. The following keywords have special meanings:
<ul>
<li><code>_self</code> (default): Show the resource in the current browsing context.</li>
<li><code>_blank</code>: Show the resource in a new, unnamed browsing context.</li>
<li><code>_parent</code>: Show the resource in the parent browsing context of the current one, if the current page is inside a frame. If there is no parent, acts the same as <code>_self</code>.</li>
<li><code>_top</code>: Show the resource in the topmost browsing context (the browsing context that is an ancestor of the current one and has no parent). If there is no parent, acts the same as <code>_self</code>.</li>
</ul>
</dd>
<dd>Use this attribute only if the {{htmlattrxref("href", "area")}} attribute is present.
<p>Use this attribute only if the {{htmlattrxref("href", "area")}} attribute is present.</p>
<div class="notecard note">
<h4>Note</h4>
<p>Setting <code>target="_blank"</code> on <code>&lt;area&gt;</code> elements implicitly provides the same <code>rel</code> behavior as setting <code><a href="/en-US/docs/Web/HTML/Link_types/noopener">rel="noopener"</a></code> which does not set <code>window.opener</code>. See <a href="#browser_compatibility">browser compatibility</a> for support status.</p>
Expand Down
3 changes: 1 addition & 2 deletions files/en-us/web/html/element/base/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ <h2 id="Attributes">Attributes</h2>
<dt>{{htmlattrdef("href")}}</dt>
<dd>The base URL to be used throughout the document for relative URLs. Absolute and relative URLs are allowed.</dd>
<dt>{{htmlattrdef("target")}}</dt>
<dd>A <strong>keyword</strong> or <strong>author-defined name</strong> of the default {{Glossary("browsing context")}} to show the results of navigation from {{HTMLElement("a")}}, {{HTMLElement("area")}}, or {{HTMLElement("form")}} elements without explicit <code>target</code> attributes.</dd>
<dd>The following keywords have special meanings:
<dd><p>A <strong>keyword</strong> or <strong>author-defined name</strong> of the default {{Glossary("browsing context")}} to show the results of navigation from {{HTMLElement("a")}}, {{HTMLElement("area")}}, or {{HTMLElement("form")}} elements without explicit <code>target</code> attributes. The following keywords have special meanings:</p>
<ul>
<li><code>_self</code> (default): Show the result in the current browsing context.</li>
<li><code>_blank</code>: Show the result in a new, unnamed browsing context.</li>
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/html/element/button/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ <h2 id="Attributes">Attributes</h2>
<p>Firefox, unlike other browsers, <a href="https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing">persists the dynamic disabled state</a> of a {{HTMLElement("button")}} across page loads. Use the {{htmlattrxref("autocomplete","button")}} attribute to control this feature.</p>
</dd>
<dt>{{htmlattrdef("form")}}</dt>
<dd>The {{HTMLElement("form")}} element to associate the button with (its <em>form owner</em>). The value of this attribute must be the <code>id</code> of a <code>&lt;form&gt;</code> in the same document. (If this attribute is not set, the <code>&lt;button&gt;</code> is associated with its ancestor <code>&lt;form&gt;</code> element, if any.)</dd>
<dd>This attribute lets you associate <code>&lt;button&gt;</code> elements to <code>&lt;form&gt;</code>s anywhere in the document, not just inside a <code>&lt;form&gt;</code>. It can also override an ancestor <code>&lt;form&gt;</code> element.</dd>
<dd><p>The {{HTMLElement("form")}} element to associate the button with (its <em>form owner</em>). The value of this attribute must be the <code>id</code> of a <code>&lt;form&gt;</code> in the same document. (If this attribute is not set, the <code>&lt;button&gt;</code> is associated with its ancestor <code>&lt;form&gt;</code> element, if any.)</p>
<p>This attribute lets you associate <code>&lt;button&gt;</code> elements to <code>&lt;form&gt;</code>s anywhere in the document, not just inside a <code>&lt;form&gt;</code>. It can also override an ancestor <code>&lt;form&gt;</code> element.</p></dd>
<dt>{{htmlattrdef("formaction")}}</dt>
<dd>The URL that processes the information submitted by the button. Overrides the {{htmlattrxref("action","form")}} attribute of the button's form owner. Does nothing if there is no form owner.</dd>
<dt>{{htmlattrdef("formenctype")}}</dt>
Expand All @@ -91,8 +91,8 @@ <h2 id="Attributes">Attributes</h2>
<p>If specified, this attribute overrides the {{htmlattrxref("method","form")}} attribute of the button's form owner.</p>
</dd>
<dt>{{htmlattrdef("formnovalidate")}}</dt>
<dd>If the button is a submit button, this Boolean attribute specifies that the form is not to be <a href="/en-US/docs/Learn/Forms/Form_validation">validated</a> when it is submitted. If this attribute is specified, it overrides the {{htmlattrxref("novalidate","form")}} attribute of the button's form owner.</dd>
<dd>This attribute is also available on <code><a href="/en-US/docs/Web/HTML/Element/input/image">&lt;input type="image"&gt;</a></code> and <code><a href="/en-US/docs/Web/HTML/Element/input/submit">&lt;input type="submit"&gt;</a></code> elements.</dd>
<dd><p>If the button is a submit button, this Boolean attribute specifies that the form is not to be <a href="/en-US/docs/Learn/Forms/Form_validation">validated</a> when it is submitted. If this attribute is specified, it overrides the {{htmlattrxref("novalidate","form")}} attribute of the button's form owner.</p>
<p>This attribute is also available on <code><a href="/en-US/docs/Web/HTML/Element/input/image">&lt;input type="image"&gt;</a></code> and <code><a href="/en-US/docs/Web/HTML/Element/input/submit">&lt;input type="submit"&gt;</a></code> elements.</p></dd>
<dt>{{htmlattrdef("formtarget")}}</dt>
<dd>If the button is a submit button, this attribute is a author-defined name or standardized, underscore-prefixed keyword indicating where to display the response from submitting the form. This is the <code>name</code> of, or keyword for, a <em>browsing context</em> (a tab, window, or {{HTMLElement("iframe")}}). If this attribute is specified, it overrides the {{htmlattrxref("target", "form")}} attribute of the button's form owner. The following keywords have special meanings:
<ul>
Expand Down
11 changes: 4 additions & 7 deletions files/en-us/web/html/element/iframe/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,14 @@ <h2 id="Attributes">Attributes</h2>

<dl>
<dt>{{htmlattrdef("allow")}}</dt>
<dd>Specifies a <a href="/en-US/docs/Web/HTTP/Feature_Policy">feature policy</a> for the <code>&lt;iframe&gt;</code>. The policy defines what features are available to the <code>&lt;iframe&gt;</code> based on the origin of the request (e.g. access to the microphone, camera, battery, web-share API, etc.).<br>
<br>
For more information and examples see: <a href="/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">Using Feature Policy</a> &gt; <a href="/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy#the_iframe_allow_attribute">The iframe allow attribute</a>.</dd>
<dd><p>Specifies a <a href="/en-US/docs/Web/HTTP/Feature_Policy">feature policy</a> for the <code>&lt;iframe&gt;</code>. The policy defines what features are available to the <code>&lt;iframe&gt;</code> based on the origin of the request (e.g. access to the microphone, camera, battery, web-share API, etc.).</p>
<p>For more information and examples see: <a href="/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy">Using Feature Policy</a> &gt; <a href="/en-US/docs/Web/HTTP/Feature_Policy/Using_Feature_Policy#the_iframe_allow_attribute">The iframe allow attribute</a>.</p></dd>
<dt>{{htmlattrdef("allowfullscreen")}}</dt>
<dd>Set to <code>true</code> if the <code>&lt;iframe&gt;</code> can activate fullscreen mode by calling the {{domxref("Element.requestFullscreen", "requestFullscreen()")}} method.</dd>
<dd>
<dd><p>Set to <code>true</code> if the <code>&lt;iframe&gt;</code> can activate fullscreen mode by calling the {{domxref("Element.requestFullscreen", "requestFullscreen()")}} method.</p>
<div class="note">This attribute is considered a legacy attribute and redefined as <code>allow="fullscreen"</code>.</div>
</dd>
<dt>{{htmlattrdef("allowpaymentrequest")}}</dt>
<dd>Set to <code>true</code> if a cross-origin <code>&lt;iframe&gt;</code> should be allowed to invoke the <a href="/en-US/docs/Web/API/Payment_Request_API">Payment Request API</a>.</dd>
<dd>
<dd><p>Set to <code>true</code> if a cross-origin <code>&lt;iframe&gt;</code> should be allowed to invoke the <a href="/en-US/docs/Web/API/Payment_Request_API">Payment Request API</a>.</p>
<div class="note">This attribute is considered a legacy attribute and redefined as <code>allow="payment"</code>.</div>
</dd>
<dt>{{htmlattrdef("csp")}} {{experimental_inline}}</dt>
Expand Down
5 changes: 1 addition & 4 deletions files/en-us/web/html/element/img/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ <h4>Note</h4>
<dt>{{htmlattrdef("decoding")}}</dt>
<dd>
<p>Provides an image decoding hint to the browser. Allowed values:</p>
</dd>
<dd>
<dl>
<dt><code>sync</code></dt>
<dd>Decode the image synchronously, for atomic presentation with other content.</dd>
Expand Down Expand Up @@ -215,8 +213,7 @@ <h3 id="Deprecated_attributes">Deprecated attributes</h3>

<dl>
<dt>{{htmlattrdef("align")}} {{deprecated_inline}}</dt>
<dd>Aligns the image with its surrounding context. Use the {{cssxref('float')}} and/or {{cssxref('vertical-align')}} {{glossary("CSS")}} properties instead of this attribute. Allowed values:</dd>
<dd>
<dd>Aligns the image with its surrounding context. Use the {{cssxref('float')}} and/or {{cssxref('vertical-align')}} {{glossary("CSS")}} properties instead of this attribute. Allowed values:
<dl>
<dt><code>top</code></dt>
<dd>Equivalent to <code>vertical-align: top</code> or <code>vertical-align: text-top</code></dd>
Expand Down
10 changes: 0 additions & 10 deletions files/en-us/web/html/element/input/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,6 @@ <h3 id="Individual_attributes">Individual attributes</h3>
<dd>
<p>A string specifying a name for the input control. This name is submitted along with the control's value when the form data is submitted.</p>

<h5 id="Whats_in_a_name">What's in a name</h5>

<p>Consider the <code>name</code> a required attribute (even though it's not). If an input has no <code>name</code> specified, or <code>name</code> is empty, the input's value is not submitted with the form! (Disabled controls, unchecked radio buttons, unchecked checkboxes, and reset buttons are also not sent.)</p>

<p>There are two special cases:</p>
Expand All @@ -620,8 +618,6 @@ <h5 id="Whats_in_a_name">What's in a name</h5>
<li><code>isindex</code>: For historical reasons, the name <code><a href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-name">isindex</a></code> is not allowed.</li>
</ol>

<h5 id="name_and_radio_buttons">name and radio buttons</h5>

<p>The <a href="#htmlattrdefname"><code>name</code></a> attribute creates a unique behavior for radio buttons.</p>

<p>Only one radio button in a same-named group of radio buttons can be checked at a time. Selecting any radio button in that group automatically deselects any currently-selected radio button in the same group. The value of that one checked radio button is sent along with the name if the form is submitted,</p>
Expand All @@ -630,8 +626,6 @@ <h5 id="name_and_radio_buttons">name and radio buttons</h5>

<p>Once one of the radio buttons in a group has focus, using the arrow keys will navigate through all the radio buttons of the same name, even if the radio buttons are not grouped together in the source order.</p>

<h5 id="HTMLFormElement.elements">HTMLFormElement.elements</h5>

<p>When an input element is given a <code>name</code>, that name becomes a property of the owning form element's {{domxref("HTMLFormElement.elements")}} property. If you have an input whose <code>name</code> is set to <code>guest</code> and another whose <code>name</code> is <code>hat-size</code>, the following code can be used:</p>

<pre class="brush: js">let form = document.querySelector("form");
Expand All @@ -648,15 +642,13 @@ <h5 id="HTMLFormElement.elements">HTMLFormElement.elements</h5>
</dd>
<dt id="htmlattrdefpattern">{{htmlattrdef("pattern")}}</dt>
<dd>
<div id="pattern-include">
<p>The <code>pattern</code> attribute, when specified, is a regular expression that the input's {{htmlattrxref("value", "input")}} must match in order for the value to pass <a href="/en-US/docs/Web/Guide/HTML/Constraint_validation">constraint validation</a>. It must be a valid JavaScript regular expression, as used by the {{jsxref("RegExp")}} type, and as documented in our <a href="/en-US/docs/Web/JavaScript/Guide/Regular_Expressions">guide on regular expressions</a>; the <code>'u'</code> flag is specified when compiling the regular expression, so that the pattern is treated as a sequence of Unicode code points, instead of as ASCII. No forward slashes should be specified around the pattern text.</p>

<p>If the <code>pattern</code> attribute is present but is not specified or is invalid, no regular expression is applied and this attribute is ignored completely. If the pattern attribute is valid and a non-empty value does not match the pattern, constraint validation will prevent form submission.</p>

<div class="note">
<p><strong>Tip:</strong> If using the <code>pattern</code> attribute, inform the user about the expected format by including explanatory text nearby. You can also include a {{htmlattrxref("title", "input")}} attribute to explain what the requirements are to match the pattern; most browsers will display this title as a tooltip. The visible explanation is required for accessibility. The tooltip is an enhancement.</p>
</div>
</div>

<p>See {{anch("Client-side validation")}} for more information.</p>
</dd>
Expand Down Expand Up @@ -688,7 +680,6 @@ <h5 id="HTMLFormElement.elements">HTMLFormElement.elements</h5>
</dd>
<dt id="htmlattrdefstep">{{htmlattrdef("step")}}</dt>
<dd>
<div id="step-include">
<p>Valid for the numeric input types, including <code>number</code>, date/time input types, and <code>range</code>, the <code><a href="/en-US/docs/Web/HTML/Attributes/step">step</a></code> attribute is a number that specifies the granularity that the value must adhere to.</p>

<p>If not explicitly included:</p>
Expand All @@ -707,7 +698,6 @@ <h5 id="HTMLFormElement.elements">HTMLFormElement.elements</h5>
<div class="note">
<p><strong>Note:</strong> When the data entered by the user doesn't adhere to the stepping configuration, the value is considered invalid in contraint validation and will match the <code>:invalid</code> pseudoclass.</p>
</div>
</div>

<p>See {{anch("Client-side validation")}} for more information.</p>
</dd>
Expand Down
Loading

0 comments on commit a6a663d

Please sign in to comment.