diff options
author | Peter Bengtsson <mail@peterbe.com> | 2021-07-15 13:41:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 13:41:58 -0400 |
commit | d79f316e1c617b165487da0198765d992cce2fff (patch) | |
tree | ec105b9d0e2e6246e2e7b85f5b7f8efd7b08c110 | |
parent | 3d809d2737f9b0fe0ef0f3d26c8c785d9d95cd09 (diff) | |
download | translated-content-d79f316e1c617b165487da0198765d992cce2fff.tar.gz translated-content-d79f316e1c617b165487da0198765d992cce2fff.tar.bz2 translated-content-d79f316e1c617b165487da0198765d992cce2fff.zip |
delete pages that were never translated from en-US (pl, part 2) (#1551)
-rw-r--r-- | files/pl/_redirects.txt | 2 | ||||
-rw-r--r-- | files/pl/_wikihistory.json | 45 | ||||
-rw-r--r-- | files/pl/learn/tools_and_testing/index.html | 48 | ||||
-rw-r--r-- | files/pl/mozilla/add-ons/webextensions/api/index.html | 61 | ||||
-rw-r--r-- | files/pl/tools/performance/index.html | 98 | ||||
-rw-r--r-- | files/pl/web/api/speechrecognition/index.html | 153 | ||||
-rw-r--r-- | files/pl/web/css/css_grid_layout/realizing_common_layouts_using_css_grid_layout/index.html | 595 | ||||
-rw-r--r-- | files/pl/web/html/element/input/index.html | 1376 | ||||
-rw-r--r-- | files/pl/web/http/headers/cache-control/index.html | 169 |
9 files changed, 0 insertions, 2547 deletions
diff --git a/files/pl/_redirects.txt b/files/pl/_redirects.txt index 9040e696b0..51ca506e89 100644 --- a/files/pl/_redirects.txt +++ b/files/pl/_redirects.txt @@ -1465,7 +1465,6 @@ /pl/docs/Narzędzia/Page_Inspector/How_to /pl/docs/Tools/Page_Inspector/How_to /pl/docs/Narzędzia/Page_Inspector/How_to/Open_the_Inspector /pl/docs/Tools/Page_Inspector/How_to/Open_the_Inspector /pl/docs/Narzędzia/Page_Inspector/Przewodnik_przez_UI /pl/docs/Tools/Page_Inspector/UI_Tour -/pl/docs/Narzędzia/Performance /pl/docs/Tools/Performance /pl/docs/Narzędzia/Walidatory /pl/docs/Tools/Validators /pl/docs/Narzędzia/about:debugging /pl/docs/Tools/about:debugging /pl/docs/Narzędzia:Walidatory /pl/docs/Tools/Validators @@ -1663,7 +1662,6 @@ /pl/docs/Web/CSS/@-moz-document /pl/docs/Web/CSS/@document /pl/docs/Web/CSS/CSS_Colors /pl/docs/Web/CSS/CSS_Color /pl/docs/Web/CSS/CSS_Colors/Narzedzie_doboru_kolorow /pl/docs/Web/CSS/CSS_Colors/Color_picker_tool -/pl/docs/Web/CSS/CSS_Grid_Layout/Realizacja_typowych_ukladow_za_pomoca_ukladu_siatki_CSS /pl/docs/Web/CSS/CSS_Grid_Layout/Realizing_common_layouts_using_CSS_Grid_Layout /pl/docs/Web/CSS/CSS_Reference /pl/docs/Web/CSS/Reference /pl/docs/Web/CSS/CSS_Reference/Rozszerzenia_Mozilli /pl/docs/Web/CSS/Mozilla_Extensions /pl/docs/Web/CSS/CSS_Selectors/Użycie_pseudoklasy_:target_w_selektorach /pl/docs/Web/CSS/CSS_Selectors/Using_the_:target_pseudo-class_in_selectors diff --git a/files/pl/_wikihistory.json b/files/pl/_wikihistory.json index 85e8f6414f..6ca2ddb0bc 100644 --- a/files/pl/_wikihistory.json +++ b/files/pl/_wikihistory.json @@ -831,12 +831,6 @@ "cs" ] }, - "Learn/Tools_and_testing": { - "modified": "2020-07-16T22:38:56.487Z", - "contributors": [ - "chrisdavidmills" - ] - }, "MDN": { "modified": "2020-02-19T18:16:07.796Z", "contributors": [ @@ -959,12 +953,6 @@ "rebloor" ] }, - "Mozilla/Add-ons/WebExtensions/API": { - "modified": "2020-05-25T16:21:21.207Z", - "contributors": [ - "rebloor" - ] - }, "Mozilla/Add-ons/WebExtensions/Your_first_WebExtension": { "modified": "2020-12-12T09:20:57.064Z", "contributors": [ @@ -1241,13 +1229,6 @@ "kubutekf" ] }, - "Tools/Performance": { - "modified": "2020-07-16T22:36:13.164Z", - "contributors": [ - "jwhitlock", - "wbamberg" - ] - }, "Tools/Validators": { "modified": "2020-07-16T22:35:03.596Z", "contributors": [ @@ -3455,12 +3436,6 @@ "Rev" ] }, - "Web/API/SpeechRecognition": { - "modified": "2020-10-15T22:25:11.426Z", - "contributors": [ - "malarium" - ] - }, "Web/API/Stylesheet/disabled": { "modified": "2019-03-23T23:45:18.937Z", "contributors": [ @@ -4264,13 +4239,6 @@ "CreateWWW" ] }, - "Web/CSS/CSS_Grid_Layout/Realizing_common_layouts_using_CSS_Grid_Layout": { - "modified": "2019-05-22T06:37:48.964Z", - "contributors": [ - "DominikKowalczyk", - "vbert" - ] - }, "Web/CSS/CSS_Lists_and_Counters/Using_CSS_counters": { "modified": "2019-03-23T23:43:40.448Z", "contributors": [ @@ -5367,12 +5335,6 @@ "Sullei" ] }, - "Web/HTML/Element/Input": { - "modified": "2019-03-23T22:58:57.333Z", - "contributors": [ - "pkuczynski" - ] - }, "Web/HTML/Element/a": { "modified": "2020-10-15T21:11:09.186Z", "contributors": [ @@ -5855,13 +5817,6 @@ "Alpha" ] }, - "Web/HTTP/Headers/Cache-Control": { - "modified": "2020-10-15T22:03:23.970Z", - "contributors": [ - "myhau", - "stopsopa" - ] - }, "Web/HTTP/Headers/Referrer-Policy": { "modified": "2020-10-15T22:25:31.082Z", "contributors": [ diff --git a/files/pl/learn/tools_and_testing/index.html b/files/pl/learn/tools_and_testing/index.html deleted file mode 100644 index 9430b94ada..0000000000 --- a/files/pl/learn/tools_and_testing/index.html +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Tools and testing -slug: Learn/Tools_and_testing -tags: - - Accessibility - - Automation - - Beginner - - CSS - - CodingScripting - - HTML - - JavaScript - - Landing - - Learn - - NeedsTranslation - - Testing - - Tools - - Topic - - TopicStub - - cross browser - - user testing -translation_of: Learn/Tools_and_testing ---- -<div>{{LearnSidebar}}</div> - -<p class="summary">Once you've started to become comfortable programming with core web technologies (like HTML, CSS, and JavaScript), and you start to get more experience, read more resources, and learn more tips and tricks, you'll start to come across all kind of tools, from ready-rolled CSS and JavaScript, to testing and automation apps, and more besides. As your web projects become larger and more complex, you'll want to start taking advantage of some of these tools, and working out reliable testing plans for your code. This part of the learning area aims to give you what you need get started and make informed choices.</p> - -<p>The web industry is an exciting place to work, but it is not without its complications. The core technologies we use to build web sites are fairly stable now, but new features are being added all the time, and new tools — that facilitate working with, and are built on top of these technologies — are constantly appearing. On top of that, we still need to keep cross-browser support in the forefront of our minds, and make sure that our code follows best practices that allow our projects to work across different browsers and devices that our users are using to browser the Web, and be usable by people with disabilities.</p> - -<p>Working out what tools you should be using can be a difficult process, so we have written this set of articles to inform you of what types of tool are available, what they can do for you, and how to make use of the current industry favourites.</p> - -<div class="note"> -<p><strong>Note</strong>: Because new tools appear and old ones go out of fashion all the time, we have deliberately written this material to be as neutral as possible — we want to focus first and foremost on the general types of tasks these tools will help you accomplish, and keep prescribing specific tools to a minimum. We obviously need to show tool usage to demonstrate specific techniques, but be clear that we do not necessarily recommend these tools as the best or only way to do things — in most cases there are other ways, but we want to provide you with a clear methodology that works.</p> -</div> - -<h2 id="Learning_pathway">Learning pathway</h2> - -<p>You should really learn the basics of the core <a href="/en-US/docs/Learn/HTML">HTML</a>, <a href="/en-US/docs/Learn/CSS">CSS</a>, and <a href="/en-US/docs/Learn/JavaScript">JavaScript</a> languages first before attempting to use the tools detailed here. For example, you'll need to know the fundamentals of these languages before you start debugging problems in complex web code, or making effective use of JavaScript libraries, or writing tests and running them against your code using test runners, etc.</p> - -<p>You need a solid foundation first.</p> - -<h2 id="Modules">Modules</h2> - -<dl> - <dt>Real world web development tools (TBD)</dt> - <dd>In this module, we explore the different kinds of web development tools available. This includes reviewing the most common kinds of tasks you may be called on to solve, how they can fit together in a workflow, and the best tools currently avaiable for carrying out those tasks.</dd> - <dt><a href="/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing">Cross browser testing</a></dt> - <dd>This module looks specifically at the area of testing web projects across different browsers. Here we look identifying your target audience (e.g. what users, browsers and devices do you most need to worry about?), how to go about doing testing, the main issues that you'll face with different types of code and how to fix/mitigate those, what tools are most useful in helping you test and fix problems, and how to use automation to speed up testing.</dd> -</dl> diff --git a/files/pl/mozilla/add-ons/webextensions/api/index.html b/files/pl/mozilla/add-ons/webextensions/api/index.html deleted file mode 100644 index 724bf34516..0000000000 --- a/files/pl/mozilla/add-ons/webextensions/api/index.html +++ /dev/null @@ -1,61 +0,0 @@ ---- -title: JavaScript APIs -slug: Mozilla/Add-ons/WebExtensions/API -tags: - - NeedsTranslation - - TopicStub - - WebExtensions -translation_of: Mozilla/Add-ons/WebExtensions/API ---- -<div>{{AddonSidebar}}</div> - -<div> -<p>JavaScript APIs for WebExtensions can be used inside the extension's <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Anatomy_of_a_WebExtension#Background_scripts">background scripts</a> and in any other documents bundled with the extension, including <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_action">browser action</a> or <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Page_actions">page action</a> popups, <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Sidebars">sidebars</a>, <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Options_pages">options pages</a>, or <a href="/en-US/Add-ons/WebExtensions/manifest.json/chrome_url_overrides">new tab pages</a>. A few of these APIs can also be accessed by an extension's <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Anatomy_of_a_WebExtension#Content_scripts">content scripts</a> (see the <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Content_scripts#WebExtension_APIs">list in the content script guide</a>).</p> - -<p>To use the more powerful APIs you need to <a href="https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/permissions">request permission</a> in your extension's <code>manifest.json</code>.</p> - -<p>You can access the APIs using the <code>browser</code> namespace:</p> - -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">function</span> <span class="function token">logTabs</span><span class="punctuation token">(</span>tabs<span class="punctuation token">)</span> <span class="punctuation token">{</span> - console<span class="punctuation token">.</span><span class="function token">log</span><span class="punctuation token">(</span>tabs<span class="punctuation token">)</span> -<span class="punctuation token">}</span> - -browser<span class="punctuation token">.</span>tabs<span class="punctuation token">.</span><span class="function token">query</span><span class="punctuation token">(</span><span class="punctuation token">{</span>currentWindow<span class="punctuation token">:</span> <span class="keyword token">true</span><span class="punctuation token">}</span><span class="punctuation token">,</span> logTabs<span class="punctuation token">)</span></code></pre> -</div> - -<div> -<p>Many of the APIs are asynchronous, returning a {{JSxRef("Promise")}}:</p> - -<pre class="brush: js line-numbers language-js"><code class="language-js"><span class="keyword token">function</span> <span class="function token">logCookie</span><span class="punctuation token">(</span>c<span class="punctuation token">)</span> <span class="punctuation token">{</span> - console<span class="punctuation token">.</span><span class="function token">log</span><span class="punctuation token">(</span>c<span class="punctuation token">)</span> -<span class="punctuation token">}</span> - -<span class="keyword token">function</span> <span class="function token">logError</span><span class="punctuation token">(</span>e<span class="punctuation token">)</span> <span class="punctuation token">{</span> - console<span class="punctuation token">.</span><span class="function token">error</span><span class="punctuation token">(</span>e<span class="punctuation token">)</span> -<span class="punctuation token">}</span> - -<span class="keyword token">let</span> setCookie <span class="operator token">=</span> browser<span class="punctuation token">.</span>cookies<span class="punctuation token">.</span><span class="keyword token">set</span><span class="punctuation token">(</span> - <span class="punctuation token">{</span>url<span class="punctuation token">:</span> <span class="string token">"https://developer.mozilla.org/"</span><span class="punctuation token">}</span> -<span class="punctuation token">)</span><span class="punctuation token">;</span> -setCookie<span class="punctuation token">.</span><span class="function token">then</span><span class="punctuation token">(</span>logCookie<span class="punctuation token">,</span> logError<span class="punctuation token">)</span></code></pre> -</div> - -<div> -<p>Note that this is different from Google Chrome's extension system, which uses the <code>chrome</code> namespace instead of <code>browser</code>, and which uses callbacks instead of promises for asynchronous functions. As a porting aid, the Firefox implementation of WebExtensions APIs supports <code>chrome</code> and callbacks as well as <code>browser</code> and promises. Mozilla has also written a polyfill which enables code that uses <code>browser</code> and promises to work unchanged in Chrome: <a class="external external-icon" href="https://github.com/mozilla/webextension-polyfill">https://github.com/mozilla/webextension-polyfill</a>.</p> - -<p>Firefox also implements these APIs under the <code>chrome</code> namespace using callbacks. This allows code written for Chrome to run largely unchanged in Firefox for the APIs documented here.</p> - -<p>Microsoft Edge uses the <code>browser</code> namespace, but doesn't yet support promise-based asynchronous APIs. In Edge, for the time being, asynchronous APIs must use callbacks.</p> - -<p>Not all browsers support all the APIs: for the details, see <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs">Browser support for JavaScript APIs</a>.</p> - -<p>Tip: Throughout the JavaScript API listings you will find short code examples that illustrate how the API is used. You can exercise these examples, without needing to create a web extension, using the console in the <a href="https://extensionworkshop.com/documentation/develop/debugging/#developer-tools-toolbox">Toolbox</a>. For example, here is the first code example on this page running in the Toolbox console in Firefox Developer Edition:</p> - -<p><img alt="Illustration of a snippet of web extension code run from the console in the Toolbox" src="https://mdn.mozillademos.org/files/17186/JavaScript_exercised_in_console.jpg" style="height: 347px; width: 680px;"></p> - -<h2 id="JavaScript_API_listing">JavaScript API listing</h2> - -<p>See below for a complete list of JavaScript APIs:</p> -</div> - -<div>{{LandingPageListSubpages}}</div> diff --git a/files/pl/tools/performance/index.html b/files/pl/tools/performance/index.html deleted file mode 100644 index f9cfa310f2..0000000000 --- a/files/pl/tools/performance/index.html +++ /dev/null @@ -1,98 +0,0 @@ ---- -title: Performance -slug: Tools/Performance -tags: - - NeedsTranslation - - TopicStub -translation_of: Tools/Performance -original_slug: Narzędzia/Performance ---- -<p>The Performance tool gives you insight into your site's general responsiveness, JavaScript and layout performance. With the Performance tool you create a recording, or profile, of your site over a period of time. The tool then shows you an <a href="/en-US/docs/Tools/Performance/UI_Tour#Waterfall_overview">overview</a> of the things the browser was doing to render your site over the profile, and a graph of the <a href="/en-US/docs/Tools/Performance/Frame_rate">frame rate</a> over the profile.</p> - -<p>You get four sub-tools to examine aspects of the profile in more detail:</p> - -<ul> - <li>the <a href="/en-US/docs/Tools/Performance/Waterfall">Waterfall</a> shows the different operations the browser was performing, such as executing layout, JavaScript, repaints, and garbage collection</li> - <li>the <a href="/en-US/docs/Tools/Performance/Call_Tree">Call Tree</a> shows the JavaScript functions in which the browser spent most of its time</li> - <li>the <a href="/en-US/docs/Tools/Performance/Flame_Chart">Flame Chart</a> shows the JavaScript call stack over the course of the recording</li> - <li>the <a href="/en-US/docs/Tools/Performance/Allocations">Allocations</a> view shows the heap allocations made by your code over the course of the recording. This view only appears if you checked "Record Allocations" in the Performance tool settings.</li> -</ul> - -<p>{{EmbedYouTube("WBmttwfA_k8")}}</p> - -<hr> -<h2 id="Getting_started">Getting started</h2> - -<div class="column-container"> -<div class="column-half"> -<dl> - <dt><a href="/en-US/docs/Tools/Performance/UI_Tour">UI Tour</a></dt> - <dd> - <p>To find your way around the Performance tool, here's a quick tour of the UI.</p> - </dd> -</dl> -</div> - -<div class="column-half"> -<dl> - <dt><a href="/en-US/docs/Tools/Performance/How_to">How to</a></dt> - <dd>Basic tasks: open the tool, create, save, load, and configure recordings</dd> -</dl> -</div> -</div> - -<hr> -<h2 id="Components_of_the_Performance_tool">Components of the Performance tool</h2> - -<div class="column-container"> -<div class="column-half"> -<dl> - <dt><a href="/en-US/docs/Tools/Performance/Frame_rate">Frame rate</a></dt> - <dd>Understand your site's overall responsiveness.</dd> - <dt><a href="/en-US/docs/Tools/Performance/Call_Tree">Call Tree</a></dt> - <dd>Find bottlenecks in your site's JavaScript.</dd> - <dt><a href="/en-US/docs/Tools/Performance/Allocations">Allocations</a></dt> - <dd>See the allocations made by your code over the course of the recording.</dd> -</dl> -</div> - -<div class="column-half"> -<dl> - <dt><a href="/en-US/docs/Tools/Performance/Waterfall">Waterfall</a></dt> - <dd>Understand the work the browser's doing as the user interacts with your site.</dd> - <dt><a href="/en-US/docs/Tools/Performance/Flame_Chart">Flame Chart</a></dt> - <dd>See which JavaScript functions are executing, and when, over the course of the recording.</dd> - <dd> </dd> -</dl> -</div> -</div> - -<hr> -<h2 id="Scenarios">Scenarios</h2> - -<div class="column-container"> -<div class="column-half"> -<dl> - <dt><a href="/en-US/docs/Tools/Performance/Scenarios/Animating_CSS_properties">Animating CSS properties</a></dt> - <dd>Uses the Waterfall to understand how the browser updates a page, and how animating different CSS properties can affect performance.</dd> - <dd> </dd> -</dl> -</div> - -<div class="column-half"> -<dl> - <dt><a href="/en-US/docs/Tools/Performance/Scenarios/Intensive_JavaScript">Intensive JavaScript</a></dt> - <dd>Uses the frame rate and Waterfall tools to highlight performance problems caused by long-running JavaScript, and how using workers can help in this situation.</dd> -</dl> -</div> -</div> - -<p> </p> - -<div class="column-half"> -<dl> - <dd> </dd> -</dl> -</div> - -<p> </p> diff --git a/files/pl/web/api/speechrecognition/index.html b/files/pl/web/api/speechrecognition/index.html deleted file mode 100644 index 8f41dfb239..0000000000 --- a/files/pl/web/api/speechrecognition/index.html +++ /dev/null @@ -1,153 +0,0 @@ ---- -title: SpeechRecognition -slug: Web/API/SpeechRecognition -translation_of: Web/API/SpeechRecognition ---- -<p>{{APIRef("Web Speech API")}}{{SeeCompatTable}}</p> - -<p>Interfejs <strong><code>SpeechRecognition</code></strong> jest częścią <a href="/en-US/docs/Web/API/Web_Speech_API">Web Speech API</a> i kontroluje usługę rozpoznawania mowy. Obsługuje również {{domxref("SpeechRecognitionEvent")}} zwracany przez usługę rozpoznawania mowy.</p> - -<div class="note"> -<p><strong>Uwaga</strong>: Na Chrome użycie Speech Recognition wymaga zastosowania serwera. Dźwięk jest przesyłany do usługi web, więc nie działa offline.</p> -</div> - -<h2 id="Konstruktor">Konstruktor</h2> - -<dl> - <dt>{{domxref("SpeechRecognition.SpeechRecognition()")}}</dt> - <dd>Tworzy nowy obiekt <code>SpeechRecognition</code>.</dd> -</dl> - -<h2 id="Właściwości">Właściwości</h2> - -<p><em><code>SpeechRecognition</code> dziedziczy równiez właściwości z interfejsu rodzica, {{domxref("EventTarget")}}.</em></p> - -<dl> - <dt>{{domxref("SpeechRecognition.grammars")}}</dt> - <dd>Tworzy i zwraca kolekcję obiektów {{domxref("SpeechGrammar")}}, które reprezentują zasady gramatyczne akceptowane przez <code>SpeechRecognition</code>.</dd> - <dt>{{domxref("SpeechRecognition.lang")}}</dt> - <dd>Tworzy i zwraca język bieżącej instacji <code>SpeechRecognition</code>. Jeśli nie zostanie sprecyzowany domyślnie przyjmie wartość z atrybutu {{htmlattrxref("lang","html")}}, a jeśli i on nie został zdefiniowany - z ustawień językowych przeglądarki.</dd> - <dt>{{domxref("SpeechRecognition.continuous")}}</dt> - <dd>Ustawienie przyjęcia ciągłego strumienia mowy lub pojedynczego zwrotu. Domyslnie ustawiony na przyjęcie pojedynczego zwrotu (<code>false</code>.)</dd> - <dt>{{domxref("SpeechRecognition.interimResults")}}</dt> - <dd>Ustawienie kontrolujące zwracanie rezultatów pośrednich. Przyjmuje wartości (<code>true</code>) lub (<code>false</code>.) Rezultat pośredni rozpoznawania mowy to rezultat niepełny, uzyskiwany w trakcie rozpoznawania wypowiedzi (np. kiedy metoda {{domxref("SpeechRecognitionResult.isFinal")}} zwraca <code>false</code>.) </dd> - <dt>{{domxref("SpeechRecognition.maxAlternatives")}}</dt> - <dd>Ustawienie maksymalnej liczby alternatywnych wyników rozpoznawania mowy. Domyślnie - 1.</dd> - <dt>{{domxref("SpeechRecognition.serviceURI")}}</dt> - <dd>Specifies the location of the speech recognition service used by the current <code>SpeechRecognition</code> to handle the actual recognition. The default is the user agent's default speech service.</dd> -</dl> - -<dl> -</dl> - -<h2 id="Methods">Methods</h2> - -<p><em><code>SpeechRecognition</code> also inherits methods from its parent interface, {{domxref("EventTarget")}}.</em></p> - -<dl> - <dt>{{domxref("SpeechRecognition.abort()")}}</dt> - <dd>Stops the speech recognition service from listening to incoming audio, and doesn't attempt to return a {{domxref("SpeechRecognitionResult")}}.</dd> - <dt>{{domxref("SpeechRecognition.start()")}}</dt> - <dd>Starts the speech recognition service listening to incoming audio with intent to recognize grammars associated with the current <code>SpeechRecognition</code>.</dd> - <dt>{{domxref("SpeechRecognition.stop()")}}</dt> - <dd>Stops the speech recognition service from listening to incoming audio, and attempts to return a {{domxref("SpeechRecognitionResult")}} using the audio captured so far.</dd> -</dl> - -<h2 id="Events">Events</h2> - -<p>Listen to these events using <code><a href="/en-US/docs/Web/API/EventTarget/addEventListener">addEventListener()</a></code> or by assigning an event listener to the <code>on<em>eventname</em></code> property of this interface.</p> - -<dl> - <dt><a href="/en-US/docs/Web/API/SpeechRecognition/audiostart_event"><code>audiostart</code></a></dt> - <dd>Fired when the user agent has started to capture audio.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechRecognition/onaudiostart">onaudiostart</a></code> property.</dd> - <dt><a href="/en-US/docs/Web/API/SpeechRecognition/audioend_event"><code>audioend</code></a></dt> - <dd>Fired when the user agent has finished capturing audio.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechRecognition/onaudioend">onaudioend</a></code> property.</dd> - <dt><code><a href="/en-US/docs/Web/API/SpeechRecognition/end_event">end</a></code></dt> - <dd>Fired when the speech recognition service has disconnected.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechRecognition/onend">onend</a></code> property.</dd> - <dt><code><a href="/en-US/docs/Web/API/SpeechRecognition/error_event">error</a></code></dt> - <dd>Fired when a speech recognition error occurs.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechRecognition/onerror">onerror</a></code> property.</dd> - <dt><code><a href="/en-US/docs/Web/API/SpeechRecognition/nomatch_event">nomatch</a></code></dt> - <dd>Fired when the speech recognition service returns a final result with no significant recognition. This may involve some degree of recognition, which doesn't meet or exceed the {{domxref("SpeechRecognitionAlternative.confidence","confidence")}} threshold.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechRecognition/onnomatch">onnomatch</a></code> property.</dd> - <dt><code><a href="/en-US/docs/Web/API/SpeechRecognition/result_event">result</a></code></dt> - <dd>Fired when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechRecognition/onresult">onresult</a></code> property.</dd> - <dt><code><a href="/en-US/docs/Web/API/SpeechRecognition/soundstart_event">soundstart</a></code></dt> - <dd>Fired when any sound — recognisable speech or not — has been detected.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechRecognition/onsoundstart">onsoundstart</a></code> property.</dd> - <dt><code><a href="/en-US/docs/Web/API/SpeechRecognition/soundend_event">soundend</a></code></dt> - <dd>Fired when any sound — recognisable speech or not — has stopped being detected.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechRecognition/onsoundend">onsoundend</a></code> property.</dd> - <dt><code><a href="/en-US/docs/Web/API/SpeechRecognition/speechstart_event">speechstart</a></code></dt> - <dd>Fired when sound that is recognised by the speech recognition service as speech has been detected.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechRecognition/onspeechstart">onspeechstart</a></code> property.</dd> - <dt><code><a href="/en-US/docs/Web/API/SpeechRecognition/speechend_event">speechend</a></code></dt> - <dd>Fired when speech recognised by the speech recognition service has stopped being detected.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechRecognition/onspeechend">onspeechend</a></code> property.</dd> - <dt><code><a href="/en-US/docs/Web/API/SpeechRecognition/start_event">start</a></code></dt> - <dd>Fired when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current <code>SpeechRecognition</code>.<br> - Also available via the <code><a href="/en-US/docs/Web/API/SpeechSynthesisUtterance/onstart">onstart</a></code> property.</dd> -</dl> - -<h2 id="Examples">Examples</h2> - -<p>In our simple <a href="https://github.com/mdn/web-speech-api/tree/master/speech-color-changer">Speech color changer</a> example, we create a new <code>SpeechRecognition</code> object instance using the {{domxref("SpeechRecognition.SpeechRecognition", "SpeechRecognition()")}} constructor, create a new {{domxref("SpeechGrammarList")}}, and set it to be the grammar that will be recognised by the <code>SpeechRecognition</code> instance using the {{domxref("SpeechRecognition.grammars")}} property.</p> - -<p>After some other values have been defined, we then set it so that the recognition service starts when a click event occurs (see {{domxref("SpeechRecognition.start()")}}.) When a result has been successfully recognised, the {{domxref("SpeechRecognition.onresult")}} handler fires, we extract the color that was spoken from the event object, and then set the background color of the {{htmlelement("html")}} element to that colour.</p> - -<pre class="brush: js">var grammar = '#JSGF V1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' -var recognition = new SpeechRecognition(); -var speechRecognitionList = new SpeechGrammarList(); -speechRecognitionList.addFromString(grammar, 1); -recognition.grammars = speechRecognitionList; -//recognition.continuous = false; -recognition.lang = 'en-US'; -recognition.interimResults = false; -recognition.maxAlternatives = 1; - -var diagnostic = document.querySelector('.output'); -var bg = document.querySelector('html'); - -document.body.onclick = function() { - recognition.start(); - console.log('Ready to receive a color command.'); -} - -recognition.onresult = function(event) { - var color = event.results[0][0].transcript; - diagnostic.textContent = 'Result received: ' + color; - bg.style.backgroundColor = color; -}</pre> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - <tr> - <td>{{SpecName('Web Speech API', '#speechreco-section', 'SpeechRecognition')}}</td> - <td>{{Spec2('Web Speech API')}}</td> - <td></td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - - - -<p>{{Compat("api.SpeechRecognition")}}</p> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="/en-US/docs/Web/API/Web_Speech_API">Web Speech API</a></li> -</ul> diff --git a/files/pl/web/css/css_grid_layout/realizing_common_layouts_using_css_grid_layout/index.html b/files/pl/web/css/css_grid_layout/realizing_common_layouts_using_css_grid_layout/index.html deleted file mode 100644 index 5013e75f11..0000000000 --- a/files/pl/web/css/css_grid_layout/realizing_common_layouts_using_css_grid_layout/index.html +++ /dev/null @@ -1,595 +0,0 @@ ---- -title: Projektowanie typowych układów za pomocą układu siatki CSS -slug: Web/CSS/CSS_Grid_Layout/Realizing_common_layouts_using_CSS_Grid_Layout -translation_of: Web/CSS/CSS_Grid_Layout/Realizing_common_layouts_using_CSS_Grid_Layout -original_slug: >- - Web/CSS/CSS_Grid_Layout/Realizacja_typowych_ukladow_za_pomoca_ukladu_siatki_CSS ---- -<p>Na zakończenie tego zestawu poradników do Układów Siatki CSS (ang. CSS Grid Layout), przejdę przez kilka różnych układów, demonstrujących niektóre z technik, których można użyć podczas projektowania z użyciem tej technologii. Przyjrzymy się przykładowi, korzystającemu z wartości <a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas">grid-template-areas</a>, typowemu 12-kolumnowemu systemowi elastycznej siatki, a także wykazowi produktów stworzonemu za pomocą automatycznego rozmieszczania. Jak wynika z wyżej przedstawionych przykładów, często istnieje więcej niż jeden sposób, aby osiągnąć pożądany efekt z układem siatki. Wybierz tę metodę, która jest najbardziej pomocna w rozwiązaniu problemów przed którymi stoisz i dla projektów, które realizujesz.</p> - -<h2 id="Responsywny_układ_strony_korzystający_z_1_do_3_kolumn_o_zmiennej_pozycji_elementów_przy_użyciu_grid-template-areas">Responsywny układ strony korzystający z 1 do 3 kolumn o zmiennej pozycji elementów przy użyciu <code>grid-template-areas</code></h2> - -<p>Znacząca część stron internetowych jest odmianą tego typu układu; zawierającego treść, panele boczne, nagłówek oraz stopkę. Podczas projektowania responsywnej witryny, możesz zechcieć wyświetlić stronę w układzie pojedynczej kolumny dla małych ekranów, dla wyświetlacza o wartości granicznej dodać panel boczny, a dla najszerszych ekranów wprowadzić układ w trzech kolumnach.</p> - -<p><img alt="Image of the three different layouts created by redefining our grid at two breakpoints." src="https://mdn.mozillademos.org/files/14749/11-responsive-areas.png"></p> - -<p>Zamierzam stworzyć taki układ korzystając z <em>nazwanych pól szablonu, </em>o których możecie dowiedzieć się więcej z kursu <em><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas">Grid template areas</a></em>.</p> - -<p>Mój szkielet składa się z pojemnika zawierającego elementy z przeznaczeniem na: nagłówek i stopkę, główną zawartość strony, menu, panel boczny oraz blok przeznaczony na reklamę.</p> - -<div id="layout_1"> -<div class="hidden"> -<pre class="brush: css">* {box-sizing: border-box;} - - .wrapper { - max-width: 1024px; - margin: 0 auto; - font: 1.2em Helvetica, arial, sans-serif; - } - - .wrapper > * { - border: 2px solid #f08c00; - background-color: #ffec99; - border-radius: 5px; - padding: 10px; - } - - nav ul { - list-style: none; - margin: 0; - padding: 0; - } -</pre> -</div> - -<pre class="brush: html"><div class="wrapper"> - <header class="main-head">The header</header> - <nav class="main-nav"> - <ul> - <li><a href="">Nav 1</a></li> - <li><a href="">Nav 2</a></li> - <li><a href="">Nav 3</a></li> - </ul> - </nav> - <article class="content"> - <h1>Main article area</h1> - <p>In this layout, we display the areas in source order for any screen less that 500 pixels wide. We go to a two column layout, and then to a three column layout by redefining the grid, and the placement of items on the grid.</p> - </article> - <aside class="side">Sidebar</aside> - <div class="ad">Advertising</div> - <footer class="main-footer">The footer</footer> -</div> -</pre> - -<p>Używamy cechy {{cssxref("grid-template-areas")}} by stworzyć układ strony. Nie korzystamy jeszcze z <em>zapytań o środki dostępu</em> (ang. media-queries). Musimy teraz nadać odpowiednie nazwy polom. Żeby to zrobić skorzystamy z właściwości {{cssxref("grid-area")}}.</p> - -<pre class="brush: css">.main-head { - grid-area: header; -} -.content { - grid-area: content; -} -.main-nav { - grid-area: nav; -} -.side { - grid-area: sidebar; -} -.ad { - grid-area: ad; -} -.main-footer { - grid-area: footer; -} -</pre> - -<p>Sama w sobie, operacja ta nie tworzy żadnego układu, aczkolwiek pozwala nam na to, dzięki nadanym nazwom. Nadal nie korzystając z <em>zapytań o urządzenie dostępu</em>, nadam teraz stronie układ tworzony z myślą o wyświetlaczach mobilnych. W tym wypadku zachowam pierwotną kolejność elementów, taką jak w układzie szkieletu, starając się uniknąć najmniejszego rozdźwięku pomiędzy szablonem znaczników, a ukladem siatki, zgodnie z poradami zawartymi w <em><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_Layout_and_Accessibility">Grid layout and accessibility</a></em>. Nie definuję kolumn, ani rzędów, jednak taka stylizacja tworzy nam układ jednokolumnowy, co się zaś tyczy rzędów, zostaną stworzone samoistnie dla każdego elementu wskazanej siatki.</p> - -<pre class="brush: css">.wrapper { - display: grid; - grid-gap: 20px; - grid-template-areas: - "header" - "nav" - "content" - "sidebar" - "ad" - "footer"; -} -</pre> - -<p>Zdefiniowany mobilny układ strony (jedna kolumna) będzie się teraz wyświetlał jednakowo na każdym urządzeniu, nieleżnie od jego rozmiarów. Żeby to zmienić możemy posłużyć się <em>zapytaniem o środek dostępu</em> i przedefiniować nasz układ na wypadek, gdyby pojawiło się wystarczająco dużo miejsca na ekranie, żeby zmieścić kolejną kolumnę.</p> - -<pre class="brush: css">@media (min-width: 500px) { - .wrapper { - grid-template-columns: 1fr 3fr; - grid-template-areas: - "header header" - "nav nav" - "sidebar content" - "ad footer"; - } - nav ul { - display: flex; - justify-content: space-between; - } -} -</pre> - -<p>Możesz zaobserwować, jak będzie wyglądał nowy układ przyglądając się wartości cechy {{cssxref("grid-template-areas")}}. Element <code>header</code> (nagłówek) rozciąga się na dwie kolumny, tak, jak i element <code>nav </code>(menu). Wtrzecim rzędzie sąsiaduje element <code>sidebar</code> (panel boczny) oraz element <code>content </code>(zawartość strony). W czwartym rzędzie umieściłem element <code>ad</code> (blok reklamowy) zamiast panelu bocznego, a na samym końcu element <code>footer</code> (stopkę) rozciągnietą na cały piąty rząd. Użyłem elastycznego bloku (<em>flexbox</em>) dla menu, tak by wyświetliło się w oddalonym rzędzie.</p> - -<p>Mogę teraz dodać ostatnią wartość graniczną, wyznaczającą przejście do układu w trzech kolumnach.</p> - -<pre class="brush: css">@media (min-width: 700px) { - .wrapper { - grid-template-columns: 1fr 4fr 1fr; - grid-template-areas: - "header header header" - "nav content sidebar" - "nav content ad" - "footer footer footer" - } - nav ul { - flex-direction: column; - } -} -</pre> - -<p>The three-column layout has two <code>1fr</code> unit side columns and a middle column that has <code>4fr</code> as the track size. This means that the available space in the container is split into 6 and assigned in proportion to our three tracks – one part each to the side columns and 4 parts to the center.</p> - -<p>In this layout I am displaying the <code>nav</code> in the left column, alongside the <code>content</code>. In the right column we have the <code>sidebar</code> and underneath it the advertisements (<code>ad</code>). The <code>footer</code> now spans right across the bottom of the layout. I then use a flexbox to display the navigation as a column.</p> - -<p>{{ EmbedLiveSample('layout_1', '800', '500') }}</p> -</div> - -<p>This is a simple example but demonstrates how we can use a grid layout to rearrange our layout for different breakpoints. In particular I am changing the location of that <code>ad</code> block, as appropriate in my different column setups. I find this named areas method very helpful at a prototyping stage, it is easy to play around with the location of elements. You could always begin to use grid in this way for prototyping, even if you can’t rely on it fully in production due to the browsers that visit your site.</p> - -<h2 id="A_flexible_12-column_layout">A flexible 12-column layout</h2> - -<p>If you have been working with one of the many frameworks or grid systems you may be accustomed to laying out your site on a 12- or 16-column flexible grid. We can create this type of system using CSS Grid Layout. As a simple example, I am creating a 12-column flexible grid that has 12 <code>1fr</code>-unit column tracks, they all have a start line named <code>col-start</code>. This means that we will have twelve grid lines named <code>col-start</code>.</p> - -<div id="layout_2"> -<div class="hidden"> -<pre class="brush: css">.wrapper { - max-width: 1024px; - margin: 0 auto; - font: 1.2em Helvetica, arial, sans-serif; -} -.wrapper > * { - border: 2px solid #f08c00; - background-color: #ffec99; - border-radius: 5px; - padding: 10px; -} -</pre> -</div> - -<pre class="brush: css">.wrapper { - display: grid; - grid-template-columns: repeat(12, [col-start] 1fr); - grid-gap: 20px; -} -</pre> - -<p>To demonstrate how this grid system works I have four child elements inside my wrapper.</p> - -<pre class="brush: html"><div class="wrapper"> - <div class="item1">Start column line 1, span 3 column tracks.</div> - <div class="item2">Start column line 6, span 4 column tracks. 2 row tracks.</div> - <div class="item3">Start row 2 column line 2, span 2 column tracks.</div> - <div class="item4">Start at column line 3, span to the end of the grid (-1).</div> -</div> -</pre> - -<p>I can then place these on the grid using the named lines, and also the span keyword.</p> - -<pre class="brush: css">.item1 { - grid-column: col-start / span 3; -} -.item2 { - grid-column: col-start 6 / span 4 ; - grid-row: 1 / 3; -} -.item3 { - grid-column: col-start 2 / span 2; - grid-row: 2; -} -.item4 { - grid-column: col-start 3 / -1; - grid-row: 3; -} -</pre> - -<p>{{ EmbedLiveSample('layout_2', '800', '400') }}</p> -</div> - -<p>As described in the <a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Layout_using_Named_Grid_Lines">guide to named lines</a>, we are using the named line to place our item. As we have 12 lines all with the same name we use the name, and then the index of the line. You could also use the line index itself if you prefer and avoid using named lines at all.</p> - -<p>Rather than setting the end line number, I have chosen to say how many tracks this element should span, using the <code>span</code> keyword. I like this approach as when working with a multiple-column layout system we usually think of blocks in terms of the number of tracks of the grid they span, and adjust that for different breakpoints. To see how the blocks align themselves to the tracks, use the <a href="/en-US/docs/Tools/Page_Inspector/How_to/Examine_grid_layouts">Firefox Grid Inspector</a>. It clearly demonstrates how our items are placed.</p> - -<p><img alt="Showing the items placed on the grid with grid tracks highlighted." src="https://mdn.mozillademos.org/files/14753/11-grid-inspector-12col.png"></p> - -<p>There are some key differences with how a grid layout works over the grid systems you may have used previously. As you can see, we do not need to add any markup to create a row, grid systems need to do this to stop elements popping up into the row above. With CSS Grid Layout, we can place things into rows, with no danger of them rising up into the row above if it is left empty. Due to this <em>strict</em> column and row placement we can also easily leave white space in our layout. We also don’t need special classes to pull or push things, to indent them into the grid. All we need to do is specify the start and end line for the item.</p> - -<h3 id="Building_a_layout_using_the_12-column_system">Building a layout using the 12-column system</h3> - -<p>To see how this layout method works in practice, we can create the same layout that we created with {{cssxref("grid-template-areas")}}, this time using the 12-column grid system. I am starting with the same markup as used for the grid template areas example.</p> - -<div id="layout_3"> -<div class="hidden"> -<pre class="brush: css">* {box-sizing: border-box;} - - .wrapper { - max-width: 1024px; - margin: 0 auto; - font: 1.2em Helvetica, arial, sans-serif; - } - - .wrapper > * { - border: 2px solid #f08c00; - background-color: #ffec99; - border-radius: 5px; - padding: 10px; - } - - nav ul { - list-style: none; - margin: 0; - padding: 0; - } -</pre> -</div> - -<pre class="brush: html"><div class="wrapper"> - <header class="main-head">The header</header> - <nav class="main-nav"> - <ul> - <li><a href="">Nav 1</a></li> - <li><a href="">Nav 2</a></li> - <li><a href="">Nav 3</a></li> - </ul> - </nav> - <article class="content"><h1>Main article area</h1> - <p>In this layout, we display the areas in source order for any screen less that 500 pixels wide. We go to a two column layout, and then to a three column layout by redefining the grid, and the placement of items on the grid.</p></article> - <aside class="side">Sidebar</aside> - <div class="ad">Advertising</div> - <footer class="main-footer">The footer</footer> - </div> -</pre> - -<p>I can then set up our grid, as for the example 12-column layout above.</p> - -<pre class="brush: css">.wrapper { - display: grid; - grid-template-columns: repeat(12, [col-start] 1fr); - grid-gap: 20px; -} -</pre> - -<p>We are once again going to make this a responsive layout, this time however using named lines. Every breakpoint will use a 12-column grid, however the number of tracks that items will span changes depending on the size of the screen.</p> - -<p>We start mobile first, and all we want for the narrowest screens is for the items to remain in source order, and all span right across the grid.</p> - -<pre class="brush: css">.wrapper > * { - grid-column: col-start / span 12; -} -</pre> - -<p>At the next breakpoint we want to move to a two-column layout. Our header and navigation still span the full grid, so we do not need to specify any positioning for them. The sidebar is starting on the first column line named col-start, spanning 3 lines. It goes after row line 3, as the header and navigation are in the first two row tracks.</p> - -<p>The ad panel is below the sidebar, so starts at grid row line 4. Then we have the content and footer starting at col-start 4 and spanning 9 tracks taking them to the end of the grid.</p> - -<pre class="brush: css">@media (min-width: 500px) { - - .side { - grid-column: col-start / span 3; - grid-row: 3; - } - .ad { - grid-column: col-start / span 3; - grid-row: 4; - } - .content, .main-footer { - grid-column: col-start 4 / span 9; - } - nav ul { - display: flex; - justify-content: space-between; - } -} -</pre> - -<p>Finally we go to the three-column version of this layout. The header continues to span right across the grid, but now the navigation moves down to become the first sidebar, with the content and then the sidebar next to it. The footer now also spans across the full layout.</p> - -<pre class="brush: css">@media (min-width: 700px) { - .main-nav { - grid-column: col-start / span 2; - grid-row: 2 / 4; - } - .content { - grid-column: col-start 3 / span 8; - grid-row: 2 / 4; - } - .side { - grid-column: col-start 11 / span 2; - grid-row: 2; - } - .ad { - grid-column: col-start 11 / span 2; - grid-row: 3; - } - .main-footer { - grid-column: col-start / span 12; - } - nav ul { - flex-direction: column; - } -} -</pre> - -<p>{{ EmbedLiveSample('layout_3', '800', '450') }}</p> -</div> - -<p>Once again the <a href="/en-US/docs/Tools/Page_Inspector/How_to/Examine_grid_layouts">Grid Inspector</a> is useful to help us see how our layout has taken shape.</p> - -<p><img alt="Showing the layout with grid tracks highlighted by the grid inspector." src="https://mdn.mozillademos.org/files/14755/11-grid-inspector-12col-layout.png" style="height: 614px; width: 2050px;"></p> - -<p>Something to note as we create this layout is that we haven’t needed to explicitly position every element on the grid at each breakpoint. We have been able to inherit the placement set up for earlier breakpoints – an advantage of working “mobile first”. We are also able to take advantage of grid auto-placement. By keeping elements in a logical order, auto-placement does quite a lot of work for us in placing items onto the grid. In the final example in this guide we will create a layout that entirely relies on auto-placement.</p> - -<h2 id="A_product_listing_with_auto-placement">A product listing with auto-placement</h2> - -<p>Many layouts are essentially sets of “cards” – product listings, image galleries, and so on. A grid can make it very easy to create these listings in a way that is responsive without needing to add <a href="/en-US/docs/Web/CSS/Media_Queries">media queries</a> to make it so. In this next example I’m combining CSS Grid and Flexbox Layouts to make a simple product listing layout.</p> - -<p>The markup for my listing is an unordered list of items. Each item contains a heading, some text of varying height, and a call to action link.</p> - -<div id="layout_4"> -<pre class="brush: html"><ul class="listing"> - <li> - <h2>Item One</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Two</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li class="wide"> - <h2>Item Three</h2> - <div class="body"><p>The content of this listing item goes here.</p> - <p>This one has more text than the other items.</p> - <p>Quite a lot more</p> - <p>Perhaps we could do something different with it?</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Four</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Five</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> -</ul> -</pre> - -<div class="hidden"> -<pre class="brush: css">* {box-sizing: border-box;} - img {max-width: 100%; display: block;} - body { - font: 1.2em Helvetica, arial, sans-serif; - } - a:link, a:visited { - text-decoration: none; - color: #f08c00; - } - - h2 { - background-color: #f08c00; - color: #fff; - text-align: center; - margin: 0; - padding: 20px; - } -</pre> -</div> - -<p>We are going to create a grid with a flexible number of flexible columns. I want them never to become smaller than 200 pixels, and then to share any available remaining space equally – so we always get equal width column tracks. We achieve this with the <code>minmax()</code> function in our repeat notation for track sizing.</p> - -<pre class="brush: css">.listing { - list-style: none; - margin: 2em; - display: grid; - grid-gap: 20px; - grid-template-columns: repeat(auto-fill,minmax(200px, 1fr)); -} -</pre> - -<p>As soon as I add this CSS, the items start to lay out as a grid. If I make the window smaller or wider the number of column tracks changes – without me needing to add breakpoints using media queries and redefine the grid.</p> - -<p>I can then tidy up the internals of the boxes using a little touch of flexbox. I set the list item to <code>display: flex</code> and the <code>flex-direction</code> to <code>column</code>. I can then use an auto margin on the <code>.cta</code> to push this bar down to the bottom of the box.</p> - -<pre class="brush: css">.listing li { - border: 1px solid #ffe066; - border-radius: 5px; - display: flex; - flex-direction: column; -} -.listing .cta { - margin-top: auto; - border-top: 1px solid #ffe066; - padding: 10px; - text-align: center; -} -.listing .body { - padding: 10px; -} -</pre> - -<p>This is really one of the key reasons I would use flexbox rather than grid, if I am just aligning or distributing something in a single dimension, that’s a flexbox use case. </p> - -<p>{{ EmbedLiveSample('layout_4', '800', '900') }}</p> -</div> - -<p>This is all looking fairly complete now, however we sometimes have these cards which contain far more content than the others. It might be nice to cause those to span two tracks, and then they won’t be so tall. I have a class of <code>wide</code> on my larger item, and I add a rule {{cssxref("grid-column-end")}} with a value of <code>span 2</code>. Now when grid encounters this item, it will assign it two tracks. At some breakpoints, this means that we'll get a gap in the grid – where there isn’t space to lay out a two-track item.</p> - -<p><img alt="The layout has gaps as there is not space to layout a two track item." src="https://mdn.mozillademos.org/files/14751/11-grid-auto-flow-sparse.png" style="height: 812px; width: 800px;"></p> - -<p>I can cause a grid to backfill those gaps by setting {{cssxref("grid-auto-flow")}}<code>: dense </code> on the grid container. Take care when doing this however as it does take items away from their logical source order. You should only do this if your items do not have a set order – and be aware of the <a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_Layout_and_Accessibility#Visual_not_logical_re-ordering">issues</a> of the tab order following the source and not your reordered display.</p> - -<div id="layout_5"> -<div class="hidden"> -<pre class="brush: html"><ul class="listing"> - <li> - <h2>Item One</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Two</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li class="wide"> - <h2>Item Three</h2> - <div class="body"><p>The content of this listing item goes here.</p> - <p>This one has more text than the other items.</p> - <p>Quite a lot more</p> - <p>Perhaps we could do something different with it?</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Four</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> - <li> - <h2>Item Five</h2> - <div class="body"><p>The content of this listing item goes here.</p></div> - <div class="cta"><a href="">Call to action!</a></div> - </li> -</ul> -</pre> - -<pre class="brush: css">* {box-sizing: border-box;} - img {max-width: 100%; display: block;} - body { - font: 1.2em Helvetica, arial, sans-serif; - } - a:link, a:visited { - text-decoration: none; - color: #f08c00; - } - - h2 { - background-color: #f08c00; - color: #fff; - text-align: center; - margin: 0; - padding: 20px; - } - -.listing li { - border: 1px solid #ffe066; - border-radius: 5px; - display: flex; - flex-direction: column; -} -.listing .cta { - margin-top: auto; - border-top: 1px solid #ffe066; - padding: 10px; - text-align: center; -} -.listing .body { - padding: 10px; -} -</pre> -</div> - -<pre class="brush: css">.listing { - list-style: none; - margin: 2em; - display: grid; - grid-gap: 20px; - grid-auto-flow: dense; - grid-template-columns: repeat(auto-fill,minmax(200px, 1fr)); -} -.listing .wide { - grid-column-end: span 2; -} -</pre> - -<p>{{ EmbedLiveSample('layout_5', '800', '900') }}</p> - -<p>This technique of using auto-placement with some rules applied to certain items is very useful, and can help you to deal with content that is being output by a CMS for example, where you have repeated items and can perhaps add a class to certain ones as they are rendered into the HTML.</p> -</div> - -<h2 id="Further_exploration">Further exploration</h2> - -<p>The best way to learn to use grid layout is to continue to build examples like the ones we have covered here. Pick something that you normally build using your framework of choice, or using floats, and see if you can build it using grid. Don’t forget to find examples that are impossible to build with current methods. That might mean taking inspiration from magazines or other non-web sources. Grid Layout opens up possibilities that we have not had before, we don’t need to be tied to the same old layouts to use it.</p> - -<ul> - <li>For inspiration see the <a href="http://labs.jensimmons.com/"><em>Layout Labs</em> from Jen Simmons</a>, she has been creating layouts based on a range of sources.</li> - <li>For additional common layout patterns see <em><a href="http://gridbyexample.com">Grid by Example</a></em>, where there are many smaller examples of grid layout and also some larger UI patterns and full page layouts.</li> -</ul> - -<section class="Quick_links" id="Quick_Links"> -<ol> - <li><a href="/en-US/docs/Web/CSS"><strong>CSS</strong></a></li> - <li><a href="/en-US/docs/Web/CSS/Reference"><strong>CSS Reference</strong></a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout">CSS Grid Layout</a></li> - <li data-default-state="open"><a href="#"><strong>Guides</strong></a> - <ol> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout">Basics concepts of grid layout</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Relationship_of_Grid_Layout">Relationship to other layout methods</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Line-based_Placement_with_CSS_Grid">Line-based placement</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Grid_Template_Areas">Grid template areas</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Layout_using_Named_Grid_Lines">Layout using named grid lines</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Auto-placement_in_CSS_Grid_Layout">Auto-placement in grid layout</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Box_Alignment_in_CSS_Grid_Layout">Box alignment in grid layout</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid,_Logical_Values_and_Writing_Modes">Grids, logical values and writing modes</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_Layout_and_Accessibility">CSS Grid Layout and Accessibility</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/CSS_Grid_and_Progressive_Enhancement">CSS Grid Layout and Progressive Enhancement</a></li> - <li><a href="/en-US/docs/Web/CSS/CSS_Grid_Layout/Realizing_common_layouts_using_CSS_Grid_Layout">Realizing common layouts using grids</a></li> - </ol> - </li> - <li data-default-state="open"><a href="#"><strong>Properties</strong></a> - <ol> - <li><a href="/en-US/docs/Web/CSS/grid">grid</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-area">grid-area</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-auto-columns">grid-auto-columns</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-auto-flow">grid-auto-flow</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-auto-rows">grid-auto-rows</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-column">grid-column</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-column-end">grid-column-end</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-column-gap">grid-column-gap</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-column-start">grid-column-start</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-gap">grid-gap</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-row">grid-row</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-row-end">grid-row-end</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-row-gap">grid-row-gap</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-row-start">grid-row-start</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-template">grid-template</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-template-areas">grid-template-areas</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-template-columns">grid-template-columns</a></li> - <li><a href="/en-US/docs/Web/CSS/grid-template-rows">grid-template-rows</a></li> - </ol> - </li> - <li data-default-state="open"><a href="#"><strong>Glossary</strong></a> - <ol> - <li><a href="/en-US/docs/Glossary/Grid">Grid</a></li> - <li><a href="/en-US/docs/Glossary/Grid_lines">Grid lines</a></li> - <li><a href="/en-US/docs/Glossary/Grid_tracks">Grid tracks</a></li> - <li><a href="/en-US/docs/Glossary/Grid_cell">Grid cell</a></li> - <li><a href="/en-US/docs/Glossary/Grid_areas">Grid areas</a></li> - <li><a href="/en-US/docs/Glossary/Gutters">Gutters</a></li> - <li><a href="/en-US/docs/Glossary/Grid_Axis">Grid Axis</a></li> - <li><a href="/en-US/docs/Glossary/Grid_rows">Grid row</a></li> - <li><a href="/en-US/docs/Glossary/Grid_column">Grid column</a></li> - </ol> - </li> -</ol> -</section> diff --git a/files/pl/web/html/element/input/index.html b/files/pl/web/html/element/input/index.html deleted file mode 100644 index bbe073d4b4..0000000000 --- a/files/pl/web/html/element/input/index.html +++ /dev/null @@ -1,1376 +0,0 @@ ---- -title: <input> -slug: Web/HTML/Element/Input -translation_of: Web/HTML/Element/input ---- -<p>The HTML <strong><code><input></code> element</strong> is used to create interactive controls for web-based forms in order to accept data from the user. The semantics of an <code><input></code> varies considerably depending on the value of its <code>type</code> attribute.</p> - -<ul class="htmlelt"> - <li><dfn><a href="/en-US/docs/HTML/Content_categories">Content categories</a></dfn> <a href="/en-US/docs/HTML/Content_categories#Flow_content">Flow content</a>, listed, submittable, resettable, form-associated element, <a href="/en-US/docs/HTML/Content_categories#Phrasing_content">phrasing content</a>.<br> - If the {{htmlattrxref("type", "input")}} has not the <code>hidden</code> value, labellable element, palpable content.</li> - <li><dfn>Permitted content</dfn> None, it is an {{Glossary("empty element")}}.</li> - <li><dfn>Tag omission</dfn> Must have a start tag and must not have an end tag.</li> - <li><dfn>Permitted parent elements</dfn> Any element that accepts <a href="/en-US/docs/HTML/Content_categories#Phrasing_content">phrasing content</a>.</li> - <li><dfn>DOM interface</dfn> {{domxref("HTMLInputElement")}}</li> -</ul> - -<h2 id="Attributes">Attributes</h2> - -<p>This element includes the <a href="/en-US/docs/HTML/Global_attributes">global attributes</a>.</p> - -<dl> - <dt>{{htmlattrdef("type")}}</dt> - <dd>The type of control to display. The default type is text, if this attribute is not specified. Possible values are: - <ul> - <li><code>button</code>: A push button with no default behavior.</li> - <li><code>checkbox</code>: A check box. You must use the <strong>value</strong> attribute to define the value submitted by this item. Use the <strong>checked</strong> attribute to indicate whether this item is selected. You can also use the <strong>indeterminate</strong> attribute to indicate that the checkbox is in an indeterminate state (on most platforms, this draws a horizontal line across the checkbox).</li> - <li><code>color</code>: {{HTMLVersionInline("5")}} A control for specifying a color. A color picker's UI has no required features other than accepting simple colors as text (<a href="http://www.w3.org/TR/html5/forms.html#color-state-(type=color)">more info</a>).</li> - <li><code>date</code>: {{HTMLVersionInline("5")}} A control for entering a date (year, month, and day, with no time).</li> - <li><code>datetime</code>: {{HTMLVersionInline("5")}} A control for entering a date and time (hour, minute, second, and fraction of a second) based on UTC time zone.</li> - <li><code>datetime-local</code>: {{HTMLVersionInline("5")}} A control for entering a date and time, with no time zone.</li> - <li><code>email</code>: {{HTMLVersionInline("5")}} A field for editing an e-mail address. The input value is validated to contain either the empty string or a single valid e-mail address before submitting. The {{cssxref(":valid")}} and {{cssxref(":invalid")}} CSS pseudo-classes are applied as appropriate.</li> - <li><code>file</code>: A control that lets the user select a file. Use the <strong>accept</strong> attribute to define the types of files that the control can select.</li> - <li><code>hidden</code>: A control that is not displayed, but whose value is submitted to the server.</li> - <li><code>image</code>: A graphical submit button. You must use the <strong>src</strong> attribute to define the source of the image and the <strong>alt</strong> attribute to define alternative text. You can use the <strong>height</strong> and <strong>width</strong> attributes to define the size of the image in pixels.</li> - <li><code>month</code>: {{HTMLVersionInline("5")}} A control for entering a month and year, with no time zone.</li> - <li><code>number</code>: {{HTMLVersionInline("5")}} A control for entering a floating point number.</li> - <li><code>password</code>: A single-line text field whose value is obscured. Use the <strong>maxlength</strong> attribute to specify the maximum length of the value that can be entered.</li> - <li><code>radio</code>: A radio button. You must use the <strong>value</strong> attribute to define the value submitted by this item. Use the <strong>checked</strong> attribute to indicate whether this item is selected by default. Radio buttons that have the same value for the <strong>name</strong> attribute are in the same "radio button group"; only one radio button in a group can be selected at one time.</li> - <li><code>range</code>: {{HTMLVersionInline("5")}} A control for entering a number whose exact value is not important. This type control uses the following default values if the corresponding attributes are not specified: - <ul> - <li><code>min</code>: 0</li> - <li><code>max</code>: 100</li> - <li><code>value</code>: <code>min</code> + (<code>max</code>-<code>min</code>)/2, or <code>min</code> if <code>max</code> is less than <code>min</code></li> - <li><code>step</code>: 1</li> - </ul> - </li> - <li><code>reset</code>: A button that resets the contents of the form to default values.</li> - <li><code>search</code>: {{HTMLVersionInline("5")}} A single-line text field for entering search strings; line-breaks are automatically removed from the input value.</li> - <li><code>submit</code>: A button that submits the form.</li> - <li><code>tel</code>: {{HTMLVersionInline("5")}} A control for entering a telephone number; line-breaks are automatically removed from the input value, but no other syntax is enforced. You can use attributes such as <strong>pattern</strong> and <strong>maxlength</strong> to restrict values entered in the control. The {{cssxref(":valid")}} and {{cssxref(":invalid")}} CSS pseudo-classes are applied as appropriate.</li> - <li><code>text</code>: A single-line text field; line-breaks are automatically removed from the input value.</li> - <li><code>time</code>: {{HTMLVersionInline("5")}} A control for entering a time value with no time zone.</li> - <li><code>url</code>: {{HTMLVersionInline("5")}} A field for editing a URL. The input value is validated to contain either the empty string or a valid absolute URL before submitting. Line-breaks and leading or trailing whitespace are automatically removed from the input value. You can use attributes such as <strong>pattern</strong> and <strong>maxlength</strong> to restrict values entered in the control. The {{cssxref(":valid")}} and {{cssxref(":invalid")}} CSS pseudo-classes are applied as appropriate.</li> - <li><code>week</code>: {{HTMLVersionInline("5")}} A control for entering a date consisting of a week-year number and a week number with no time zone.</li> - </ul> - </dd> - <dt>{{htmlattrdef("accept")}}</dt> - <dd>If the value of the <strong>type</strong> attribute is <code>file</code>, this attribute indicates the types of files that the server accepts; otherwise it is ignored. The value must be a comma-separated list of unique content type specifiers: - <ul> - <li>A file extension starting with the STOP character (U+002E). (E.g.: ".jpg,.png,.doc")</li> - <li>A valid MIME type with no extensions</li> - <li><code>audio/*</code> representing sound files {{HTMLVersionInline("5")}}</li> - <li><code>video/*</code> representing video files {{HTMLVersionInline("5")}}</li> - <li><code>image/*</code> representing image files {{HTMLVersionInline("5")}}</li> - </ul> - </dd> - <dt>{{htmlattrdef("accesskey")}} {{HTMLVersionInline(4)}} only, {{obsoleteGeneric("inline", "HTML5")}}</dt> - <dd>A single-character that the user can press to switch input focus to the control. This attribute is global in HTML5.</dd> - <dt>{{htmlattrdef("mozactionhint")}} {{non-standard_inline}}</dt> - <dd>Specifies an "action hint" used to determine how to label the enter key on mobile devices with virtual keyboards. Supported values are <code>go</code>, <code>done</code>, <code>next</code>, <code>search</code>, and <code>send</code>; these automatically get mapped to the appropriate string (and are case-insensitive).</dd> - <dt>{{htmlattrdef("autocapitalize")}} {{non-standard_inline}}</dt> - <dd>This is a nonstandard attribute used by iOS Safari Mobile which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user. The non-deprecated values are available in iOS 5 and later. Possible values are: - <ul> - <li><code>none</code>: Completely disables automatic capitalization</li> - <li><code>sentences</code>: Automatically capitalize the first letter of sentences.</li> - <li><code>words</code>: Automatically capitalize the first letter of words.</li> - <li><code>characters</code>: Automatically capitalize all characters.</li> - <li><code>on</code>: {{deprecated_inline()}} Deprecated since iOS 5.</li> - <li><code>off</code>: {{deprecated_inline()}} Deprecated since iOS 5.</li> - </ul> - </dd> - <dt>{{htmlattrdef("autocomplete")}} {{HTMLVersionInline("5")}}</dt> - <dd>This attribute indicates whether the value of the control can be automatically completed by the browser. This attribute is ignored if the value of the <strong>type</strong> attribute is <code>hidden, password,</code> <code>checkbox</code>, <code>radio</code>, <code>file</code>, or a button type (<code>button</code>, <code>submit</code>, <code>reset</code>, <code>image</code>). Possible values are: - <ul> - <li><code>off</code>: The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method; the browser does not automatically complete the entry.</li> - <li><code>on</code>: The browser can automatically complete the value based on values that the user has entered during previous uses.</li> - </ul> - - <p>If the <strong>autocomplete</strong> attribute is not specified on an input element, then the browser uses the <strong>autocomplete</strong> attribute value of the <code><input></code> element's form owner. The form owner is either the <code>form</code> element that this <code><input></code> element is a descendant of or the form element whose <strong>id</strong> is specified by the <strong>form</strong> attribute of the input element. For more information, see the {{htmlattrxref("autocomplete", "form")}} attribute in {{HTMLElement("form")}}.</p> - - <p>The <strong>autocomplete</strong> attribute also controls whether Firefox will, unlike other browsers, <a href="http://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing">persist the dynamic disabled state and (if applicable) dynamic checkedness</a> of an {{HTMLElement("input")}} across page loads. The persistence feature is enabled by default. Setting the value of the <strong>autocomplete</strong> attribute to <code>off</code> disables this feature; this works even when the <strong>autocomplete</strong> attribute would normally not apply to the {{HTMLElement("input")}} by virtue of its <strong>type</strong>. See {{bug(654072)}}.</p> - </dd> - <dt>{{htmlattrdef("autocorrect")}} {{non-standard_inline}}</dt> - <dd>This is a nonstandard attribute supported by Safari that is used to control whether autocorrection should be enabled when the user is entering/editing the text value of the {{HTMLElement("input")}}. Possible attribute values are: - <ul> - <li><code>on</code>: Enable autocorrection</li> - <li><code>off</code>: Disable autocorrection</li> - </ul> - </dd> - <dt>{{htmlattrdef("autofocus")}} {{HTMLVersionInline("5")}}</dt> - <dd>This Boolean attribute lets you specify that a form control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form element in a document can have the <strong>autofocus</strong> attribute, which is a Boolean. It cannot be applied if the <strong>type</strong> attribute is set to <code>hidden</code> (that is, you cannot automatically set focus to a hidden control).</dd> - <dt>{{htmlattrdef("autosave")}} {{HTMLVersionInline("5")}}</dt> - <dd>This attribute should be defined as a unique value. If the value of the type attribute is <code>search</code>, previous search term values will persist in the dropdown across page load.</dd> - <dt>{{htmlattrdef("checked")}}</dt> - <dd> - <p>When the value of the <strong>type</strong> attribute is <code>radio</code> or <code>checkbox</code>, the presence of this Boolean attribute indicates that the control is selected by default; otherwise it is ignored.</p> - - <p>Firefox will, unlike other browsers, by default, <a href="http://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing">persist the dynamic checked state</a> of an {{HTMLElement("input")}} across page loads. Use the {{htmlattrxref("autocomplete","input")}} attribute to control this feature.</p> - </dd> - <dt>{{htmlattrdef("disabled")}}</dt> - <dd> - <p>This Boolean attribute indicates that the form control is not available for interaction. In particular, the <code>click</code> event <a class="external" href="https://html.spec.whatwg.org/multipage/forms.html#enabling-and-disabling-form-controls:-the-disabled-attribute">will not be dispatched</a> on disabled controls. Also, a disabled control's value isn't submitted with the form.</p> - - <p>Firefox will, unlike other browsers, by default, <a href="http://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing">persist the dynamic disabled state</a> of an {{HTMLElement("input")}} across page loads. Use the {{htmlattrxref("autocomplete","input")}} attribute to control this feature.</p> - </dd> - <dt>{{htmlattrdef("form")}} {{HTMLVersionInline("5")}}</dt> - <dd>The form element that the input element is associated with (its <em>form owner</em>). The value of the attribute must be an <strong>id</strong> of a {{HTMLElement("form")}} element in the same document. If this attribute is not specified, this <code><input></code> element must be a descendant of a {{HTMLElement("form")}} element. This attribute enables you to place <code><input></code> elements anywhere within a document, not just as descendants of their form elements. An input can only be associated with one form.</dd> - <dt>{{htmlattrdef("formaction")}} {{HTMLVersionInline("5")}}</dt> - <dd>The URI of a program that processes the information submitted by the input element, if it is a submit button or image. If specified, it overrides the {{htmlattrxref("action","form")}} attribute of the element's form owner.</dd> - <dt>{{htmlattrdef("formenctype")}} {{HTMLVersionInline("5")}}</dt> - <dd>If the input element is a submit button or image, this attribute specifies the type of content that is used to submit the form to the server. Possible values are: - <ul> - <li><code>application/x-www-form-urlencoded</code>: The default value if the attribute is not specified.</li> - <li><code>multipart/form-data</code>: Use this value if you are using an {{HTMLElement("input")}} element with the {{htmlattrxref("type","input")}} attribute set to <code>file</code>.</li> - <li><code>text/plain</code></li> - </ul> - - <p>If this attribute is specified, it overrides the {{htmlattrxref("enctype","form")}} attribute of the element's form owner.</p> - </dd> - <dt>{{htmlattrdef("formmethod")}} {{HTMLVersionInline("5")}}</dt> - <dd>If the input element is a submit button or image, this attribute specifies the HTTP method that the browser uses to submit the form. Possible values are: - <ul> - <li><code>post</code>: The data from the form is included in the body of the form and is sent to the server.</li> - <li><code>get</code>: The data from the form are appended to the <strong>form</strong> attribute URI, with a '?' as a separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.</li> - </ul> - - <p>If specified, this attribute overrides the {{htmlattrxref("method","form")}} attribute of the element's form owner.</p> - </dd> - <dt>{{htmlattrdef("formnovalidate")}} {{HTMLVersionInline("5")}}</dt> - <dd>If the input element is a submit button or image, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the {{htmlattrxref("novalidate","form")}} attribute of the element's form owner.</dd> - <dt>{{htmlattrdef("formtarget")}} {{HTMLVersionInline("5")}}</dt> - <dd>If the input element is a submit button or image, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a <em>browsing context</em> (for example, tab, window, or inline frame). If this attribute is specified, it overrides the {{htmlattrxref("target", "form")}} attribute of the elements's form owner. The following keywords have special meanings: - <ul> - <li>_<code>self</code>: Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified.</li> - <li><code>_blank</code>: Load the response into a new unnamed browsing context.</li> - <li><code>_parent</code>: Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as <code>_self</code>.</li> - <li><code>_top</code>: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as <code>_self</code>.</li> - </ul> - </dd> - <dt>{{htmlattrdef("height")}} {{HTMLVersionInline("5")}}</dt> - <dd>If the value of the <strong>type</strong> attribute is <code>image</code>, this attribute defines the height of the image displayed for the button.</dd> - <dt>{{htmlattrdef("incremental")}} {{non-standard_inline}}</dt> - <dd>This is a nonstandard attribute supported by Safari that only applies when the <strong>type</strong> is <code>search</code>. If the attribute is present, regardless of what its value is, the {{HTMLElement("input")}} fires <a href="/en-US/docs/Web/Events/search"><code>search</code></a> events as the user edits the text value. The event is only fired after an implementation-defined timeout has elapsed since the most recent keystroke; new keystrokes reset the timeout. In other words, the event firing is debounced. If the attribute is absent, the <a href="/en-US/docs/Web/Events/search"><code>search</code></a> event is only fired when the user explicitly initiates a search (e.g. by pressing the Enter key while within field).</dd> - <dt>{{htmlattrdef("inputmode")}} {{HTMLVersionInline("5")}}</dt> - <dd>A hint to the browser for which keyboard to display. This attribute applies when the value of the <strong>type</strong> attribute is text, password, email, or url. Possible values are: - <ul> - <li><code>verbatim</code>: Alphanumeric, non-prose content such as usernames and passwords.</li> - <li><code>latin</code>: Latin-script input in the user's preferred language with typing aids such as text prediction enabled. For human-to-computer communication such as search boxes.</li> - <li><code>latin-name</code>: As <em>latin</em>, but for human names.</li> - <li><code>latin-prose</code>: As <em>latin</em>, but with more aggressive typing aids. For human-to-human communication such as instant messaging for email.</li> - <li><code>full-width-latin</code>: As <em>latin-prose</em>, but for the user's secondary languages.</li> - <li><code>kana</code>: Kana or romaji input, typically hiragana input, using full-width characters, with support for converting to kanji. Intended for Japanese text input.</li> - <li><code>katakana</code>: Katakana input, using full-width characters, with support for converting to kanji. Intended for Japanese text input.</li> - <li><code>numeric</code>: Numeric input, including keys for the digits 0 to 9, the user's preferred thousands separator character, and the character for indicating negative numbers. Intended for numeric codes, e.g. credit card numbers. For actual numbers, prefer using <input type="number"></li> - <li><code>tel</code>: Telephone input, including asterisk and pound key. Use <input type="tel"> if possible instead.</li> - <li><code>email</code>: Email input. Use <input type="email"> if possible instead.</li> - <li><code>url</code>: URL input. Use <input type="url"> if possible instead.</li> - </ul> - </dd> - <dt>{{htmlattrdef("list")}} {{HTMLVersionInline("5")}}</dt> - <dd>Identifies a list of pre-defined options to suggest to the user. The value must be the <strong>id</strong> of a {{HTMLElement("datalist")}} element in the same document. The browser displays only options that are valid values for this input element. This attribute is ignored when the <strong>type</strong> attribute's value is <code>hidden</code>, <code>checkbox</code>, <code>radio</code>, <code>file</code>, or a button type.</dd> - <dt>{{htmlattrdef("max")}} {{HTMLVersionInline("5")}}</dt> - <dd>The maximum (numeric or date-time) value for this item, which must not be less than its minimum (<strong>min</strong> attribute) value.</dd> - <dt>{{htmlattrdef("maxlength")}}</dt> - <dd>If the value of the <strong>type</strong> attribute is <code>text</code>, <code>email</code>,<code> search</code>, <code>password</code>, <code>tel</code>, or <code>url</code>, this attribute specifies the maximum number of characters (in Unicode code points) that the user can enter; for other control types, it is ignored. It can exceed the value of the <strong>size</strong> attribute. If it is not specified, the user can enter an unlimited number of characters. Specifying a negative number results in the default behavior; that is, the user can enter an unlimited number of characters. The constraint is evaluated only when the value of the attribute has been changed.</dd> - <dt>{{htmlattrdef("min")}} {{HTMLVersionInline("5")}}</dt> - <dd>The minimum (numeric or date-time) value for this item, which must not be greater than its maximum (<strong>max</strong> attribute) value.</dd> - <dt>{{htmlattrdef("minlength")}} {{HTMLVersionInline("5")}}</dt> - <dd>If the value of the <strong>type</strong> attribute is <code>text</code>, <code>email</code>,<code> search</code>, <code>password</code>, <code>tel</code>, or <code>url</code>, this attribute specifies the minimum number of characters (in Unicode code points) that the user can enter; for other control types, it is ignored.</dd> - <dt>{{htmlattrdef("multiple")}} {{HTMLVersionInline("5")}}</dt> - <dd>This Boolean attribute indicates whether the user can enter more than one value. This attribute applies when the <strong>type</strong> attribute is set to <code>email</code> or <code>file</code>; otherwise it is ignored.</dd> - <dt>{{htmlattrdef("name")}}</dt> - <dd>The name of the control, which is submitted with the form data.</dd> - <dt>{{htmlattrdef("pattern")}} {{HTMLVersionInline("5")}}</dt> - <dd>A regular expression that the control's value is checked against. The pattern must match the entire value, not just some subset. Use the <strong>title</strong> attribute to describe the pattern to help the user. This attribute applies when the value of the <strong>type</strong> attribute is <code>text</code>, <code>search</code>, <code>tel</code>, <code>url</code> or <code>email</code>; otherwise it is ignored. The regular expression language is the same as JavaScript's. The pattern is not surrounded by forward slashes.</dd> - <dt>{{htmlattrdef("placeholder")}} {{HTMLVersionInline("5")}}</dt> - <dd>A hint to the user of what can be entered in the control . The placeholder text must not contain carriage returns or line-feeds. This attribute applies when the value of the <strong>type</strong> attribute is <code>text</code>, <code>search</code>, <code>tel</code>, <code>url</code> or <code>email</code>; otherwise it is ignored. - <div class="note"><strong>Note:</strong> Do not use the <code>placeholder</code> attribute instead of a {{HTMLElement("label")}} element. Their purposes are different: the {{HTMLElement("label")}} attribute describes the role of the form element; that is, it indicates what kind of information is expected, the <code>placeholder</code> attribute is a hint about the format the content should take. There are cases in which the <code>placeholder</code> attribute is never displayed to the user, so the form must be understandable without it.</div> - </dd> - <dt>{{htmlattrdef("readonly")}}</dt> - <dd>This Boolean attribute indicates that the user cannot modify the value of the control. - <p>{{HTMLVersionInline("5")}} This attribute is ignored if the value of the <strong>type</strong> attribute is <code>hidden</code>, <code>range</code>, <code>color</code>, <code>checkbox</code>, <code>radio</code>, <code>file</code>, or a button type.</p> - </dd> - <dt>{{htmlattrdef("required")}} {{HTMLVersionInline("5")}}</dt> - <dd>This attribute specifies that the user must fill in a value before submitting a form. It cannot be used when the <strong>type</strong> attribute is <code>hidden</code>, <code>image</code>, or a button type (<code>submit</code>, <code>reset</code>, or <code>button</code>). The {{cssxref(":optional")}} and {{cssxref(":required")}} CSS pseudo-classes will be applied to the field as appropriate.</dd> - <dt>{{htmlattrdef("results")}} {{non-standard_inline}}</dt> - <dd>This is a nonstandard attribute supported by Safari that only applies when the <strong>type</strong> is <code>search</code>. It is used to control the maximum number of entries that should be displayed in the {{HTMLElement("input")}}'s native dropdown list of past search queries. Its value should be a nonnegative decimal integer.</dd> - <dt>{{htmlattrdef("selectionDirection")}} {{HTMLVersionInline("5")}}</dt> - <dd>The direction in which selection occurred. This is "forward" if the selection was made from left-to-right in an LTR locale or right-to-left in an RTL locale, or "backward" if the selection was made in the opposite direction. This can be "none" if the selection direction is unknown.</dd> - <dt>{{htmlattrdef("size")}}</dt> - <dd>The initial size of the control. This value is in pixels unless the value of the <strong>type</strong> attribute is <code>text</code> or <code>password</code>, in which case, it is an integer number of characters. Starting in HTML5, this attribute applies only when the <strong>type</strong> attribute is set to <code>text</code>, <code>search</code>, <code>tel</code>, <code>url</code>, <code>email</code>, or <code>password</code>; otherwise it is ignored. In addition, the size must be greater than zero. If you don't specify a size, a default value of 20 is used.</dd> - <dt>{{htmlattrdef("spellcheck")}} {{HTMLVersionInline("5")}}</dt> - <dd>Setting the value of this attribute to <code>true</code> indicates that the element needs to have its spelling and grammar checked. The value <code>default</code> indicates that the element is to act according to a default behavior, possibly based on the parent element's own <code>spellcheck</code> value. The value <code>false</code> indicates that the element should not be checked.</dd> - <dt>{{htmlattrdef("src")}}</dt> - <dd>If the value of the <strong>type</strong> attribute is <code>image</code>, this attribute specifies a URI for the location of an image to display on the graphical submit button; otherwise it is ignored.</dd> - <dt>{{htmlattrdef("step")}} {{HTMLVersionInline("5")}}</dt> - <dd>Works with the <strong>min</strong> and <strong>max</strong> attributes to limit the increments at which a numeric or date-time value can be set. It can be the string <code>any</code> or a positive floating point number. If this attribute is not set to <code>any</code>, the control accepts only values at multiples of the step value greater than the minimum.</dd> - <dt>{{htmlattrdef("tabindex")}} element-specific in {{HTMLVersionInline(4)}}, global in {{HTMLVersionInline("5")}}</dt> - <dd>The position of the element in the tabbing navigation order for the current document.</dd> - <dt>{{htmlattrdef("usemap")}} {{HTMLVersionInline(4)}} only, {{obsoleteGeneric("inline", "HTML5")}}</dt> - <dd>The name of a {{HTMLElement("map")}} element to as an image map.</dd> - <dt>{{htmlattrdef("value")}}</dt> - <dd>The initial value of the control. This attribute is optional except when the value of the <strong>type</strong> attribute is <code>radio</code> or <code>checkbox</code>.<br> - Note that when reloading the page, Gecko and IE <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=46845#c186">will ignore the value specified in the HTML source</a>, if the value was changed before the reload.</dd> - <dt>{{htmlattrdef("width")}} {{HTMLVersionInline("5")}}</dt> - <dd>If the value of the <strong>type</strong> attribute is <code>image</code>, this attribute defines the width of the image displayed for the button.</dd> - <dt>{{htmlattrdef("x-moz-errormessage")}} {{non-standard_inline}}</dt> - <dd>This Mozilla extension allows you to specify the error message to display when a field doesn't successfully validate.</dd> -</dl> - -<h2 id="Notes">Notes</h2> - -<h3 id="File_inputs">File inputs</h3> - -<div class="note"> -<p><strong>Note:</strong> Starting in {{Gecko("2.0")}}, calling the <code>click()</code> method on an {{HTMLElement("input")}} element of type "file" opens the file picker and lets the user select files. See <a href="/en-US/docs/Using_files_from_web_applications">Using files from web applications</a> for an example and more details.</p> -</div> - -<p>You can't set the value of a file picker from a script; doing something like the following has no effect:</p> - -<pre class="brush: js">var e = getElementById("someFileInputElement"); -e.value = "foo"; -</pre> - -<h3 id="Error_messages">Error messages</h3> - -<p>If you want Firefox to present a custom error message when a field fails to validate, you can use the <code>x-moz-errormessage</code> attribute to do so:</p> - -<pre class="brush: html"><input type="email" x-moz-errormessage="Please specify a valid email address."> -</pre> - -<p>Note, however, that this is not standard and will not have an effect on other browsers.</p> - -<h2 id="Examples">Examples</h2> - -<h3 id="A_simple_input_box">A simple input box</h3> - -<pre class="brush: html"><!-- A basic input --> -<input type="text" name="input" value="Type here"> -</pre> - -<p><input><img align="absmiddle" alt="" class="ife_marker" id="input_ife_marker_0" style="border: 0pt none; width: 14px; height: 19px; cursor: pointer; display: inline;" title="Max field length is unknown"></p> - -<h3 id="A_common_use-case_scenario">A common use-case scenario</h3> - -<pre class="brush: html"><!-- A common form that includes input tags --> -<form action="getform.php" method="get"> - <label>First name: <input type="text" name="first_name" /></label><br /> - <label>Last name: <input type="text" name="last_name" /></label><br /> - <label>E-mail: <input type="email" name="user_email" /></label><br /> -<input type="submit" value="Submit" /> -</form> -</pre> - -<h3 id="Using_mozactionhint_on_Firefox_mobile">Using mozactionhint on Firefox mobile</h3> - -<p>You can use the {{htmlattrxref("mozactionhint", "input")}} attribute to specify the text for the label of the enter key on the virtual keyboard when your form is rendered on Firefox mobile. For example, to have a "Next" label, you can do this:</p> - -<pre class="brush: html"><input type="text" mozactionhint="next" name="sometext" /> -</pre> - -<p>The result is:</p> - -<p><a href="/@api/deki/files/4970/=mozactionhint.png"><img alt="mozactionhint.png" class="internal default" src="/@api/deki/files/4970/=mozactionhint.png?size=webview" style="width: 210px; height: 350px; border: 1px solid black;"></a></p> - -<h2 id="Specifications" name="Specifications">Specifications</h2> - -<table class="standard-table"> - <thead> - <tr> - <th scope="col">Specification</th> - <th scope="col">Status</th> - <th scope="col">Comment</th> - </tr> - </thead> - <tbody> - <tr> - <td>{{SpecName('HTML WHATWG', 'the-input-element.html#the-input-element', '<input>')}}</td> - <td>{{Spec2('HTML WHATWG')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('HTML5 W3C', 'forms.html#the-input-element', '<input>')}}</td> - <td>{{Spec2('HTML5 W3C')}}</td> - <td> </td> - </tr> - <tr> - <td>{{SpecName('HTML4.01', 'interact/forms.html#h-17.4', '<form>')}}</td> - <td>{{Spec2('HTML4.01')}}</td> - <td> </td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2 or earlier</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=button</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>3</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=checkbox</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}<br> - {{CompatGeckoDesktop("1.9.2")}} for <code>indeterminate</code> value</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=color</td> - <td>21.0</td> - <td> - <p>{{CompatGeckoDesktop("29.0")}} (Not for Windows Touch yet)</p> - </td> - <td>{{CompatNo}}</td> - <td>11.01</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>type=date</td> - <td>5.0</td> - <td>{{CompatNo}}<br> - {{unimplemented_inline("825294")}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}} (recognized but no UI)</td> - </tr> - <tr> - <td>type=datetime</td> - <td> - <p>{{CompatNo}}<br> - (recognized but no UI)</p> - </td> - <td>{{CompatNo}}<br> - {{unimplemented_inline("825294")}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}} (recognized but no UI)</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=datetime-local</td> - <td>5.0</td> - <td>{{CompatNo}}<br> - {{unimplemented_inline("825294")}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}} (recognized but no UI)</td> - </tr> - <tr> - <td>type=email</td> - <td>5.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>type=file</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>3.02</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=hidden</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=image</td> - <td>1.0</td> - <td>Gecko 2.0 only sends x and y coordinates when clicked, not longer the name/value of the element</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=month</td> - <td>5.0</td> - <td>{{CompatNo}}<br> - {{unimplemented_inline("446510")}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}} (recognized but no UI)</td> - </tr> - <tr> - <td>type=number</td> - <td>6.0 (Localization in Chrome 11)</td> - <td>{{CompatGeckoDesktop("29.0")}}</td> - <td>10<br> - (recognized but no UI)</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>type=password</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=radio</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}<br> - {{CompatGeckoDesktop("1.9.2")}} for <code>indeterminate</code> value</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=range</td> - <td>5.0</td> - <td>{{CompatGeckoDesktop("23.0")}}</td> - <td>10</td> - <td>10.62 (11.01 added support for a default value)</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>type=reset</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=search</td> - <td>5.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>11.01</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>type=submit</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=tel</td> - <td>5.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>11.01</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>type=text</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>type=time</td> - <td>5.0</td> - <td>{{CompatNo}}<br> - {{unimplemented_inline("825294")}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}} (recognized but no UI)</td> - </tr> - <tr> - <td>type=url</td> - <td>5.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>type=week</td> - <td>5.0</td> - <td>{{CompatNo}}<br> - {{unimplemented_inline("825294")}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}} (recognized but no UI)</td> - </tr> - <tr> - <td> - <p>accept=[file extension]</p> - </td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatNo}}</td> - <td>10</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td> - <p>accept=[MIME type]</p> - </td> - <td>8.0</td> - <td>{{CompatGeckoDesktop("16.0")}}</td> - <td>10</td> - <td>10</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>accept=audio/*</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("2.0")}}<br> - Filters for the following audio file extensions: .aac, .aif, .flac, .iff, .m4a, .m4b, .mid, .midi, .mp3, .mpa, .mpc, .oga, .ogg, .ra, .ram, .snd, .wav, .wma</td> - <td>10</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>accept=video/*</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("2.0")}}<br> - Filters for the following video file extensions: .avi, .divx, .flv, .m4v, .mkv, .mov, .mp4, .mpeg, .mpg, .ogm, .ogv, .ogx, .rm, .rmvb, .smil, .webm, .wmv, .xvid</td> - <td>10</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>accept=image/*</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoDesktop("2.0")}}<br> - Filters for the following image file extensions: .jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw</td> - <td>10</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>accept=[. + ext]</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop("37.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>accesskey</td> - <td>1.0</td> - <td>{{CompatVersionUnknown}}</td> - <td>6</td> - <td>1.0</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>mozactionhint</td> - <td>{{CompatNo}}</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>autocomplete</td> - <td>17.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>5</td> - <td>9.6</td> - <td>5.2</td> - </tr> - <tr> - <td>autofocus</td> - <td>5.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>9.6</td> - <td>5.0</td> - </tr> - <tr> - <td>checked</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>disabled</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>6</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>form</td> - <td>9.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>formaction</td> - <td>9.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>10.62</td> - <td>5.2</td> - </tr> - <tr> - <td>formenctype</td> - <td>9.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>formmethod</td> - <td>9.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>10.62</td> - <td>5.2</td> - </tr> - <tr> - <td>formnovalidate</td> - <td>5.0 (in 6.0 only worked with HTML5 doctype, validation support in 7.0 was disabled and re-enabled in 10.0)</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>formtarget</td> - <td>9.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>10.62</td> - <td>5.2</td> - </tr> - <tr> - <td>height</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("16.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>1.0</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>incremental</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>inputmode</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>list</td> - <td>20.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>9.6</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>max</td> - <td>5.0</td> - <td>{{CompatGeckoDesktop("16.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>maxlength</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>min</td> - <td>5.0</td> - <td>{{CompatGeckoDesktop("16.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>minlength</td> - <td>40.0</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>27.0</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>multiple</td> - <td>1.0 (supported for type=file and type=email as of 5.0)</td> - <td>{{CompatGeckoDesktop("1.9.2")}} for <strong>type</strong>=file<br> - {{CompatVersionUnknown}} for <strong>type</strong>=email</td> - <td>10</td> - <td>1.0 (10.62 support for type=file and as of 11.01 type=email)</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>name</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>pattern</td> - <td>5.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>9.6</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>placeholder</td> - <td>10.0</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>11.00</td> - <td>5.0</td> - </tr> - <tr> - <td>readonly</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>6 (missing for <strong>type</strong> of <code>checkbox</code>, <code>radio</code>)</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>required</td> - <td>5.0 (support for select element as of 10)</td> - <td>{{CompatGeckoDesktop("2.0")}}</td> - <td>10</td> - <td>9.6</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>size</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>spellcheck</td> - <td>10.0</td> - <td>{{CompatGeckoDesktop("1.9.2")}}</td> - <td>10</td> - <td>11.0</td> - <td>4.0</td> - </tr> - <tr> - <td>src</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>2</td> - <td>1.0</td> - <td>1.0</td> - </tr> - <tr> - <td>step</td> - <td>6.0</td> - <td>{{CompatGeckoDesktop("16.0")}}</td> - <td>10</td> - <td>10.62</td> - <td>5.0</td> - </tr> - <tr> - <td>tabindex</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("1.7 or earlier")}}</td> - <td>6 (elements with tabindex > 0 are not navigated)</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>width</td> - <td>1.0</td> - <td>{{CompatGeckoDesktop("16.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>1.0</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>type</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>type=button</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>type=checkbox</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>type=color</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoDesktop("27.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>type=date</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>5.0</td> - </tr> - <tr> - <td>type=datetime</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=datetime-local</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=email</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>3.1 (no validation but gives a specific keyboard)</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=file</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}} [1]</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=hidden</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=image</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=month</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=number</td> - <td>2.3 (no validation but gives a specific keyboard)</td> - <td>{{CompatGeckoMobile("29.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>4.0 (no validation but gives a specific keyboard)</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=password</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=radio</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=range</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>5.0</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=reset</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=search</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>4.0</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=submit</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=tel</td> - <td>2.3</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>3.1</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=text</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=time</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=url</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>3.1 (no validation but gives a specific keyboard)</td> - </tr> - <tr> - <td style="white-space: nowrap;">type=week</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>10.62</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>accept=[MIME type]</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>accept=audio/*</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>accept=image/*</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>accept=video/*</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>accept=[. + ext]</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("37.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>accesskey</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>autocomplete</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>autofocus</td> - <td>3.2</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>checked</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>disabled</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>form</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>formaction</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>5.0</td> - </tr> - <tr> - <td>formenctype</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>formmethod</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>5.0</td> - </tr> - <tr> - <td>formnovalidate</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>formtarget</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>5.0</td> - </tr> - <tr> - <td>height</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("16.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>list</td> - <td>{{CompatNo}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>max</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("16.0")}} (UI might remain unimplemented)</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>maxlength</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>min</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("16.0")}} (UI might remain unimplemented)</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>minlength</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>multiple</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>name</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>1.0</td> - </tr> - <tr> - <td>pattern</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>placeholder</td> - <td>2.3</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>11.10</td> - <td>4</td> - </tr> - <tr> - <td>readonly</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>required</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>size</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>spellcheck</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("2.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>11.0</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>src</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>step</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("16.0")}} (UI might remain unimplemented)</td> - <td>{{CompatUnknown}}</td> - <td>10.62</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>tabindex</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - <tr> - <td>width</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile("16.0")}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1]: <a href="http://blog.uploadcare.com/post/97884147203/you-cannot-upload-files-to-a-server-using-mobile-safari">File uploads were broken</a> in Mobile Safari for iOS 8.0 and 8.0.1. The bug was fixed in iOs 8.0.2.</p> - -<p>Safari Mobile for iOS applies a default style of <code>{{cssxref("opacity")}}: 0.4</code> to disabled textual {{HTMLElement("input")}} elements. Other major browsers don't currently share this particular default style.</p> - -<p>On Safari Mobile for iOS, setting <code>{{cssxref("display")}}: block</code> on an {{HTMLElement("input")}} of <code>type="date"</code>, <code>type="time"</code>, <code>type="datetime-local"</code>, or <code>type="month"</code> causes the text within the {{HTMLElement("input")}} to become vertically misaligned. <a href="https://bugs.webkit.org/show_bug.cgi?id=139848">See WebKit bug #139848.</a></p> - -<p>As of Chrome v39, an <code><input type="date"></code> styled with <code>{{cssxref("display")}}: table-cell; {{cssxref("width")}}: 100%;</code> will have a {{cssxref("min-width")}} imposed by Chrome and it cannot become narrower than this minimum width. <a href="https://code.google.com/p/chromium/issues/detail?id=346051">See Chromium bug #346051.</a></p> - -<h3 id="Gecko_notes">Gecko notes</h3> - -<p>Firefox will, unlike other browsers, by default, <a href="http://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing">persist the dynamic disabled state and (if applicable) dynamic checkedness</a> of an {{HTMLElement("input")}} across page loads. Setting the value of the {{htmlattrxref("autocomplete","input")}} attribute to <code>off</code> disables this feature; this works even when the {{htmlattrxref("autocomplete","input")}} attribute would normally not apply to the {{HTMLElement("input")}} by virtue of its {{htmlattrxref("type","input")}}. See {{bug(654072)}}.</p> - -<p>Starting in Gecko 9.0 {{geckoRelease("9.0")}}, Firefox for Android lets users capture images using their camera and upload them, without having to leave the browser. Web developers can implement this feature by simply specifying setting the <code>accept</code> attribute's value to "image/*" on their <code>file</code> input, like this:</p> - -<p><code><input type="file" accept="image/*"></code></p> - -<p>Firefox for Android sets a default {{ cssxref("background-image") }} gradient on all <code>type="text"</code>, <code>type="file"</code>, <code>type="button"</code>, and <code>type="submit"</code> inputs. This can be disabled using <code>background-image: none</code>.</p> - -<p>Firefox for Android also sets a default {{ cssxref("border") }} on all <code><input type="file"></code> elements.</p> - -<h4 id="Localization">Localization</h4> - -<p>The allowed inputs for certain <input> types depend on the locale. In some locales, 1,000.00 is a valid number, while in other locales the valid way to enter this number is 1.000,00.</p> - -<p>Firefox uses the following heuristics to determine the locale to validate the user's input (at least for type="number"):</p> - -<ul> - <li>Try the language specified by a 'lang'/'xml:lang' attribute on the element or any of its parents;</li> - <li>Try the language specified by any Content-Language HTTP header or</li> - <li>If none specified, use the browser's locale.</li> -</ul> - -<h2 id="See_also">See also</h2> - -<ul> - <li>Other form-related elements: {{HTMLElement("form")}}, {{HTMLElement("button")}}, {{HTMLElement("datalist")}}, {{HTMLElement("legend")}}, {{HTMLElement("label")}}, {{HTMLElement("select")}}, {{HTMLElement("optgroup")}}, {{HTMLElement("option")}}, {{HTMLElement("textarea")}}, {{HTMLElement("keygen")}}, {{HTMLElement("fieldset")}}, {{HTMLElement("output")}}, {{HTMLElement("progress")}} and {{HTMLElement("meter")}}.</li> - <li><a class="external" href="http://webdesignerwall.com/tutorials/cross-browser-html5-placeholder-text">Cross-browser HTML5 placeholder text</a></li> -</ul> - -<p>{{HTMLRef}}</p> diff --git a/files/pl/web/http/headers/cache-control/index.html b/files/pl/web/http/headers/cache-control/index.html deleted file mode 100644 index 2efcf437d8..0000000000 --- a/files/pl/web/http/headers/cache-control/index.html +++ /dev/null @@ -1,169 +0,0 @@ ---- -title: Cache-Control -slug: Web/HTTP/Headers/Cache-Control -translation_of: Web/HTTP/Headers/Cache-Control ---- -<div>{{HTTPSidebar}}</div> - -<p><strong><code>Cache-Control</code></strong> nagłówek jest stosowany do określania dyrektyw sterujących pamięcią podręczną w zapytaniu i odpowiedzi protokołu HTTP. Dyrektywy pamięci podręcznej są jednokierunkowe, co oznacza że dyrektywa użyta w zapytaniu klienta HTTP nie musi pojawić się w odpowiedzi serwera.</p> - -<table class="properties"> - <tbody> - <tr> - <th scope="row">Header type</th> - <td>{{Glossary("General header")}}</td> - </tr> - <tr> - <th scope="row">{{Glossary("Forbidden header name")}}</th> - <td>no</td> - </tr> - <tr> - <th scope="row">{{Glossary("Simple response header", "CORS-safelisted response-header")}}</th> - <td>yes</td> - </tr> - </tbody> -</table> - -<h2 id="Składnia">Składnia</h2> - -<p>Wielkość liter nie ma znaczeniu w określaniu dyrektyw. Dyrektywa może posiadać opcjonalny argument który może być podany jako token (słowo) lub string w cudzysłowiu. Możliwe jest podanie wielu dyrektyw przez oddzielenie ich przecinkiem.</p> - -<h3 id="Dyrektywy_zapytania">Dyrektywy zapytania</h3> - -<p>Standardowe dyrektywy nagłówka <code>Cache-Control</code> które mogą być użyte w zapytaniu klienta HTTP.</p> - -<pre class="syntaxbox">Cache-Control: max-age=<seconds> -Cache-Control: max-stale[=<seconds>] -Cache-Control: min-fresh=<seconds> -Cache-Control: no-cache -Cache-Control: no-store -Cache-Control: no-transform -Cache-Control: only-if-cached -</pre> - -<h3 id="Dyrektywy_odpowiedzi">Dyrektywy odpowiedzi</h3> - -<p>Standardowe dyrektywy nagłówka <code>Cache-Control</code> które mogą być użyte w odpowiedzi serwera HTTP.</p> - -<pre class="syntaxbox">Cache-Control: must-revalidate -Cache-Control: no-cache -Cache-Control: no-store -Cache-Control: no-transform -Cache-Control: public -Cache-Control: private -Cache-Control: proxy-revalidate -Cache-Control: max-age=<seconds> -Cache-Control: s-maxage=<seconds> -</pre> - -<h3 id="Extension_Cache-Control_directives">Extension <code>Cache-Control</code> directives</h3> - -<p>Extension <code>Cache-Control</code> directives are not part of the core HTTP caching standards document. Be sure to check the <a href="#Browser_compatibility">compatibility table</a> for their support.</p> - -<pre class="syntaxbox">Cache-Control: immutable -Cache-Control: stale-while-revalidate=<seconds> -Cache-Control: stale-if-error=<seconds> -</pre> - -<h2 id="Directives">Directives</h2> - -<h3 id="Cacheability">Cacheability</h3> - -<dl> - <dt><code>public</code></dt> - <dd>Indicates that the response may be cached by any cache.</dd> - <dt><code>private</code></dt> - <dd>Indicates that the response is intended for a single user and must not be stored by a shared cache. A private cache may store the response.</dd> - <dt><code>no-cache</code></dt> - <dd>Forces caches to submit the request to the origin server for validation before releasing a cached copy.</dd> - <dt><code>only-if-cached</code></dt> - <dd>Indicates to not retrieve new data. This being the case, the server wishes the client to obtain a response only once and then cache. From this moment the client should keep releasing a cached copy and avoid contacting the origin-server to see if a newer copy exists.</dd> -</dl> - -<h3 id="Expiration">Expiration</h3> - -<dl> - <dt><code>max-age=<seconds></code></dt> - <dd>Specifies the maximum amount of time a resource will be considered fresh. Contrary to <code>Expires</code>, this directive is relative to the time of the request.</dd> - <dt><code>s-maxage=<seconds></code></dt> - <dd>Overrides <code>max-age</code> or the <code>Expires</code> header, but it only applies to shared caches (e.g., proxies) and is ignored by a private cache.</dd> - <dt><code>max-stale[=<seconds>]</code></dt> - <dd>Indicates that the client is willing to accept a response that has exceeded its expiration time. Optionally, you can assign a value in seconds, indicating the time the response must not be expired by.</dd> - <dt><code>min-fresh=<seconds></code></dt> - <dd>Indicates that the client wants a response that will still be fresh for at least the specified number of seconds.</dd> - <dt><code>stale-while-revalidate=<seconds></code> {{experimental_inline}}</dt> - <dd>Indicates that the client is willing to accept a stale response while asynchronously checking in the background for a fresh one. The seconds value indicates for how long the client is willing to accept a stale response.</dd> - <dt><code>stale-if-error=<seconds></code> {{experimental_inline}}</dt> - <dd>Indicates that the client is willing to accept a stale response if the check for a fresh one fails. The seconds value indicates for how long the client is willing to accept the stale response after the initial expiration.</dd> -</dl> - -<h3 id="Revalidation_and_reloading">Revalidation and reloading</h3> - -<dl> - <dt><code>must-revalidate</code></dt> - <dd>The cache must verify the status of the stale resources before using it and expired ones should not be used.</dd> - <dt><code>proxy-revalidate</code></dt> - <dd>Same as <code>must-revalidate</code>, but it only applies to shared caches (e.g., proxies) and is ignored by a private cache.</dd> - <dt><code>immutable</code></dt> - <dd>Indicates that the response body will not change over time. The resource, if unexpired, is unchanged on the server and therefore the client should not send a conditional revalidation for it (e.g. <code>If-None-Match</code> or <code>If-Modified-Since</code>) to check for updates, even when the user explicitly refreshes the page. Clients that aren't aware of this extension must ignore them as per the HTTP specification. In Firefox, <code>immutable</code> is only honored on <code>https://</code> transactions. For more information, see also this <a href="http://bitsup.blogspot.de/2016/05/cache-control-immutable.html">blog post</a>.</dd> -</dl> - -<h3 id="Other">Other</h3> - -<dl> - <dt><code>no-store</code></dt> - <dd>The cache should not store anything about the client request or server response.</dd> - <dt><code>no-transform</code></dt> - <dd>No transformations or conversions should be made to the resource. The Content-Encoding, Content-Range, Content-Type headers must not be modified by a proxy. A non- transparent proxy might, for example, convert between image formats in order to save cache space or to reduce the amount of traffic on a slow link. The <code>no-transform</code> directive disallows this.</dd> -</dl> - -<h2 id="Examples">Examples</h2> - -<h3 id="Preventing_caching">Preventing caching</h3> - -<p>To turn off caching, you can send the following response header. In addition, see also the <code>Expires</code> and <code>Pragma</code> headers.</p> - -<pre class="brush: bash">Cache-Control: no-cache, no-store, must-revalidate -</pre> - -<h3 id="Caching_static_assets">Caching static assets</h3> - -<p>For the files in the application that will not change, you can usually add aggressive caching by sending the response header below. This includes static files that are served by the application such as images, CSS files and JavaScript files, for example. In addition, see also the <code>Expires</code> header.</p> - -<pre class="brush: bash">Cache-Control: public, max-age=31536000</pre> - -<h2 id="Specifications">Specifications</h2> - -<table class="standard-table"> - <tbody> - <tr> - <th scope="col">Specification</th> - <th scope="col">Title</th> - </tr> - <tr> - <td>{{RFC("7234")}}</td> - <td>Hypertext Transfer Protocol (HTTP/1.1): Caching</td> - </tr> - <tr> - <td>{{RFC("5861")}}</td> - <td>HTTP Cache-Control Extensions for Stale Content</td> - </tr> - <tr> - <td>{{RFC("8246")}}</td> - <td>HTTP Immutable Responses</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Browser compatibility</h2> - -<p>{{Compat("http.headers.Cache-Control")}}</p> - -<h2 id="See_also">See also</h2> - -<ul> - <li><a href="/en-US/docs/Web/HTTP/Caching_FAQ">HTTP Caching FAQ</a></li> - <li>{{HTTPHeader("Age")}}</li> - <li>{{HTTPHeader("Expires")}}</li> - <li>{{HTTPHeader("Pragma")}}</li> -</ul> |