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

Reference local favicon images #6052

Merged
merged 1 commit into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/en-us/web/html/attributes/rel/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ <h2 id="Specifications">Specifications</h2>
<tr>
<td>{{SpecName('HTML WHATWG', 'links.html#linkTypes', 'rel attribute')}}</td>
<td>{{Spec2('HTML WHATWG')}}</td>
<td>Added <code>opener</code>. Made <code>noopener</code> default  for <code>target="_blank"</code>.</td>
<td>Added <code>opener</code>. Made <code>noopener</code> default for <code>target="_blank"</code>.</td>
</tr>
<tr>
<td>{{SpecName('HTML5 W3C', 'links.html#linkTypes', 'rel attribute')}}</td>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions files/en-us/web/html/element/figure/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ <h3 id="Images">Images</h3>
<pre class="brush: html">&lt;!-- Just an image --&gt;
&lt;figure&gt;
&lt;img
src="https://developer.mozilla.org/static/img/favicon144.png"
src="favicon-192x192.png"
alt="The beautiful MDN logo."&gt;
&lt;/figure&gt;

&lt;!-- Image with a caption --&gt;
&lt;figure&gt;
&lt;img
src="https://developer.mozilla.org/static/img/favicon144.png"
src="favicon-192x192.png"
alt="The beautiful MDN logo."&gt;
&lt;figcaption&gt;MDN Logo&lt;/figcaption&gt;
&lt;/figure&gt;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/en-us/web/html/element/img/favicon144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added files/en-us/web/html/element/img/favicon72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions files/en-us/web/html/element/img/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ <h3 id="Alternative_text">Alternative text</h3>

<p>The following example embeds an image into the page and includes alternative text for accessibility.</p>

<pre class="brush: html">&lt;img src="https://developer.mozilla.org/static/img/favicon144.png"
<pre class="brush: html">&lt;img src="favicon144.png"
alt="MDN logo"&gt;
</pre>

Expand All @@ -259,7 +259,7 @@ <h3 id="Image_link">Image link</h3>
<p>This example builds upon the previous one, showing how to turn the image into a link. To do so, nest the <code>&lt;img&gt;</code> tag inside the {{HTMLElement("a")}}. You should made the alternative text describe the resource the link is pointing to, as if you were using a text link instead.</p>

<pre class="brush: html">&lt;a href="https://developer.mozilla.org"&gt;
&lt;img src="https://developer.mozilla.org/static/img/favicon144.png"
&lt;img src="favicon144.png"
alt="Visit the MDN site"&gt;
&lt;/a&gt;</pre>

Expand All @@ -269,20 +269,20 @@ <h3 id="Using_the_srcset_attribute">Using the srcset attribute</h3>

<p>In this example we include a <code>srcset</code> attribute with a reference to a high-resolution version of the logo; this will be loaded instead of the <code>src</code> image on high-resolution devices. The image referenced in the <code>src</code> attribute is counted as a <code>1x</code> candidate in {{glossary("User agent", "user agents")}} that support <code>srcset</code>.</p>

<pre class="brush: html"> &lt;img src="https://developer.mozilla.org/static/img/favicon72.png"
<pre class="brush: html"> &lt;img src="favicon72.png"
alt="MDN logo"
srcset="https://developer.mozilla.org/static/img/favicon144.png 2x"&gt;</pre>
srcset="favicon144.png 2x"&gt;</pre>

<p>{{EmbedLiveSample("Using_the_srcset_attribute", "100%", "160")}}</p>

<h3 id="Using_the_srcset_and_sizes_attributes">Using the srcset and sizes attributes</h3>

<p>The <code>src</code> attribute is ignored in {{glossary("User agent", "user agents")}} that support <code>srcset</code> when <code>w</code> descriptors are included. When the <code>(max-width: 600px)</code> media condition matches, the 200 pixel-wide image will load (it is the one that matches <code>200px</code> most closely), otherwise the other image will load.</p>

<pre class="brush: html"> &lt;img src="/files/16864/clock-demo-200px.png"
<pre class="brush: html"> &lt;img src="clock-demo-200px.png"
alt="Clock"
srcset="/files/16864/clock-demo-200px.png 200w,
/files/16797/clock-demo-400px.png 400w"
srcset="clock-demo-200px.png 200w,
clock-demo-400px.png 400w"
sizes="(max-width: 600px) 200px, 50vw"&gt;</pre>

<p>{{EmbedLiveSample("Using_the_srcset_and_sizes_attributes", "100%", 350)}}</p>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion files/en-us/web/html/element/menuitem/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h3 id="HTML">HTML</h3>
&lt;menu type="context" id="popup-menu"&gt;
  &lt;menuitem type="checkbox" checked&gt;Checkbox&lt;/menuitem&gt;
  &lt;hr&gt;
  &lt;menuitem type="command" label="This command does nothing" icon="https://developer.mozilla.org/static/img/favicon144.png"&gt;
  &lt;menuitem type="command" label="This command does nothing" icon="favicon-192x192.png"&gt;
    Commands don't render their contents.
  &lt;/menuitem&gt;
  &lt;menuitem type="command" label="This command has javascript" onclick="alert('command clicked')"&gt;
Expand Down