file stringlengths 16 94 | text stringlengths 32 24.4k | vector list |
|---|---|---|
html/reference/elements/meta/name/text-scale/index.md | HTML - Elements - meta - name - text-scale - Examples - A text-scale-responsive layout - CSS:
By default, the main content and sidebar are laid out one below the other. We include a `@media` query that lays the elements out side-by-side using CSS Grid when the viewport becomes wider than `35rem`.
Example:
body {
m... | [
-0.7408547401428223,
-0.21873141825199127,
-0.4024415612220764,
-0.19652746617794037,
0.5251208543777466,
-1.404986023902893,
0.009332247078418732,
1.3040941953659058,
-0.27328982949256897,
0.255171537399292,
-0.0198068730533123,
0.2021077275276184,
-0.4376622438430786,
0.04043985903263092... |
html/reference/elements/meta/name/responsive-embedded-sizing/index.md | HTML - Elements - meta - name - responsive-embedded-sizing:
The `responsive-embedded-sizing` value for the `name` attribute of a `meta` element opts in a document embedded in an `iframe` to sharing its size information with the parent document. The frame can then be sized relative to its contained document's layout si... | [
-0.5156805515289307,
-0.5179339051246643,
-0.7703157067298889,
-0.3375086486339569,
-0.6640668511390686,
-1.4158391952514648,
1.1583449840545654,
0.40465247631073,
0.035604365170001984,
-0.2379918098449707,
-0.5387699007987976,
0.011584289371967316,
-1.0769399404525757,
0.07570362091064453... |
html/reference/elements/meta/name/responsive-embedded-sizing/index.md | HTML - Elements - meta - name - responsive-embedded-sizing - Description:
For security and privacy reasons, `iframe` elements do not by default expose any information to the parent document about the size of the content in the document they are embedding.
To enable responsive sizing of `iframe` elements based on thei... | [
-0.3553730547428131,
-0.10713368654251099,
-0.43477970361709595,
-0.3832906186580658,
-0.5101696252822876,
-1.2942761182785034,
1.043576955795288,
0.5822291374206543,
-0.34654518961906433,
-0.07077900320291519,
-0.31991928815841675,
0.6627775430679321,
-1.147863745689392,
-0.04155710712075... |
html/reference/elements/meta/name/responsive-embedded-sizing/index.md | HTML - Elements - meta - name - responsive-embedded-sizing - Examples:
See the `frame-sizing` and `Window.requestResize()` pages for complete examples. | [
-0.14937829971313477,
0.2123923897743225,
-0.882537305355072,
-0.8169414401054382,
-1.0239121913909912,
-0.9773489236831665,
1.2564018964767456,
0.5497963428497314,
0.32778140902519226,
-0.13463354110717773,
0.28305763006210327,
0.4415653944015503,
-0.636741578578949,
0.3023587465286255,
... |
html/reference/elements/td/index.md | HTML - Elements - td:
The `<td>` HTML element defines a cell of a table that contains data and may be used as a child of the `tr` element.
Example:
<table>
<caption>
Alien football stars
</caption>
<thead>
<tr>
<th scope="col">Player</th>
<th scope="col">Gloobles</th>
<th scope="col">... | [
-0.12339449673891068,
-0.403916597366333,
-0.8936521410942078,
0.36839067935943604,
-0.05148026719689369,
-1.32070791721344,
0.5276638865470886,
1.1605863571166992,
-0.6961656212806702,
0.2553670406341553,
-0.5237269997596741,
-0.0845344141125679,
-0.58182293176651,
0.43049356341362,
0.0... |
html/reference/elements/td/index.md | HTML - Elements - td - Attributes:
This element includes the global attributes.
- `colspan`: Contains a non-negative integer value that indicates how many columns the data cell spans or extends. The default value is `1`. Values higher than `1000` are clipped to `1000`.
- `headers`: Contains a list of space-separated ... | [
-0.4640398323535919,
-0.4646553099155426,
-1.9792535305023193,
0.06761447340250015,
-0.4582812786102295,
-1.4380794763565063,
0.7631328701972961,
0.5163737535476685,
-0.264030396938324,
-0.0010568834841251373,
-0.9211108088493347,
0.4861416816711426,
-1.0654919147491455,
0.8620654344558716... |
html/reference/elements/td/index.md | HTML - Elements - td - Attributes - Deprecated attributes:
The following attributes are deprecated and should not be used. They are documented below for reference when updating existing code and for historical interest only.
- `abbr` (deprecated): Contains a short abbreviated description of the data cell's content. S... | [
-0.17011334002017975,
-0.1404927670955658,
-0.5223759412765503,
-0.38120177388191223,
0.5969048738479614,
-1.5287474393844604,
0.7357379198074341,
1.4383035898208618,
0.21732455492019653,
0.7806484699249268,
-0.3148824870586395,
0.24444952607154846,
-0.9540630578994751,
-0.0321009978652000... |
html/reference/elements/td/index.md | HTML - Elements - td - Usage notes:
- The `<td>` may only be used within a `tr` element.
- When using the `colspan` and `rowspan` attributes to span data cells across multiple columns and rows, cells without these attributes defined (with a default value of `1`) are automatically fitted into free available spaces in t... | [
-0.33846402168273926,
-0.052691202610731125,
-2.325129270553589,
0.49952447414398193,
0.06586675345897675,
-0.7337220311164856,
1.3451262712478638,
0.6732431054115295,
-0.2870623469352722,
0.5174251198768616,
-0.4916127622127533,
-0.09350549429655075,
-0.0863557904958725,
-0.05735544860363... |
html/reference/elements/td/index.md | HTML - Elements - td - Examples:
See `table` for a complete table example introducing common standards and best practices. | [
0.548336386680603,
-0.2599962055683136,
-2.6403496265411377,
-0.0782332569360733,
-0.552573561668396,
-0.985986053943634,
0.7574724555015564,
0.6925404071807861,
-0.04242416098713875,
0.5394666790962219,
0.13939903676509857,
0.40064430236816406,
-0.8265717029571533,
0.9766274690628052,
0... |
html/reference/elements/td/index.md | HTML - Elements - td - Examples - Basic data cells:
This example uses `<td>` elements along with other table-related elements to introduce a basic table with data about the phonetic alphabet. | [
0.9234346151351929,
0.14470067620277405,
-2.5263144969940186,
-0.36907997727394104,
-0.20556846261024475,
-1.077701449394226,
1.9508739709854126,
1.0174427032470703,
-0.32101720571517944,
0.10720432549715042,
-0.353847861289978,
0.0444762259721756,
-0.823417067527771,
-0.01885516196489334,... |
html/reference/elements/td/index.md | HTML - Elements - td - Examples - Basic data cells - HTML:
Some table rows (`tr` elements) contain both header cells (`th` elements) and data cell `<td>` elements. The `th` element that is the first child of each row forms the first column of the table, with each `<th>` providing the row header for the data cells with... | [
0.12244290113449097,
-0.7844443917274475,
-1.1881448030471802,
0.6573441624641418,
0.284382164478302,
-0.4505099654197693,
0.6590057015419006,
1.2250163555145264,
0.1957140564918518,
0.6780372858047485,
-0.44603800773620605,
0.13445231318473816,
-0.46694105863571167,
0.6077722311019897,
... |
html/reference/elements/td/index.md | HTML - Elements - td - Examples - Basic data cells - CSS:
Some basic CSS is used to style the table and its cells. CSS attribute selectors and the `:nth-of-type` pseudo-class are used to alternate the appearance of the cells to make the information in the table easier to understand and identify.
Example:
td,
th {
... | [
-0.10250088572502136,
-0.23096013069152832,
-0.7387939095497131,
-0.05720803141593933,
0.34894075989723206,
-0.8143369555473328,
0.4987519383430481,
0.7088868618011475,
0.05459189414978027,
0.4066820442676544,
-0.49408379197120667,
-0.03132621943950653,
-0.11017065495252609,
0.141635134816... |
html/reference/elements/td/index.md | HTML - Elements - td - Examples - Column and row spanning:
This example extends and enhances the basic table from the previous example by adding an additional "ABC" cell. | [
0.9112153649330139,
0.012770827859640121,
-1.7200857400894165,
-0.3933716118335724,
-0.22532741725444794,
-0.7538079023361206,
2.1535260677337646,
1.0919599533081055,
-0.5834585428237915,
0.08175543695688248,
-0.27797731757164,
-0.5034692287445068,
-1.3065640926361084,
0.4583706259727478,
... |
html/reference/elements/td/index.md | HTML - Elements - td - Examples - Column and row spanning - HTML:
An additional data cell (`<td>` element) is introduced within the first row (`tr` element). This creates a fourth column in the table.
Using the `rowspan` attribute, the "ABC" cell is spanned across the first three rows of the table. The last data cell... | [
0.010016089305281639,
-0.27591264247894287,
-0.649797260761261,
0.6812531352043152,
0.3294493854045868,
-0.3081050515174866,
0.6364827156066895,
1.332390546798706,
-0.27787524461746216,
0.7856130599975586,
-0.6212689280509949,
0.045150868594646454,
-0.1731611043214798,
0.1428203284740448,
... |
html/reference/elements/td/index.md | HTML - Elements - td - Examples - Column and row spanning - CSS:
The `:first-of-type` and `:last-of-type` pseudo-classes are used in the CSS to select and style the added "ABC" data cell.
Example:
tr:first-of-type td:last-of-type {
width: 60px;
background-color: #505050;
color: white;
font-weight: bold;
te... | [
-0.18776869773864746,
-0.6741839647293091,
-0.6750142574310303,
-0.07836701720952988,
0.4873855710029602,
-0.7673867344856262,
0.06380944699048996,
1.7188745737075806,
-0.3725893199443817,
0.7533487677574158,
-0.45743367075920105,
0.05426643788814545,
-0.17555439472198486,
-0.3152659535408... |
html/reference/elements/td/index.md | HTML - Elements - td - Examples - Associate data cells with header cells:
For more complex relationships between data cells (`<td>` elements) and header cells (`th` elements), using `th` elements with the `scope` attribute alone may not be sufficient for assistive technologies, especially screen readers. | [
0.8190313577651978,
-0.3810008466243744,
-1.546522617340088,
-0.03815888985991478,
-0.41351860761642456,
-0.8585770726203918,
1.4752181768417358,
0.40328389406204224,
0.09978744387626648,
0.4255664646625519,
0.10281969606876373,
-0.792780339717865,
-0.6188773512840271,
0.4498526453971863,
... |
html/reference/elements/td/index.md | HTML - Elements - td - Examples - Associate data cells with header cells - HTML:
To improve the `accessibility` of the previous example and to allow screen readers, for example, to speak the headers associated with each data cell, the `headers` attribute can be introduced along with `id` attributes. Each row header ce... | [
0.22877883911132812,
-0.8210253715515137,
-1.0827176570892334,
0.3958238363265991,
-0.2829269766807556,
-1.0544614791870117,
0.5204595327377319,
0.8375709652900696,
-0.6459534764289856,
0.6543392539024353,
-0.8495433330535889,
-0.34913745522499084,
0.09873053431510925,
0.2766611576080322,
... |
html/reference/elements/video/index.md | HTML - Elements - video:
The `<video>` HTML element embeds a media player which supports video playback into the document. You can use `<video>` for audio content as well, but the `audio` element may provide a more appropriate user experience.
Example:
<video controls width="250">
<source src="/shared-assets/video... | [
-0.16179676353931427,
-0.7162474989891052,
-0.908839762210846,
1.011029601097107,
0.05831021070480347,
-0.860628068447113,
-0.020881790667772293,
1.8162870407104492,
-0.8496533036231995,
0.06451605260372162,
-0.04543256014585495,
-0.4465344250202179,
0.09005413949489594,
-0.493656575679779... |
html/reference/elements/video/index.md | HTML - Elements - video - Attributes:
Like all other HTML elements, this element supports the global attributes.
- `autoplay`: A Boolean attribute; if specified, the video automatically begins to play back as soon as it can without stopping to finish loading the data. Note: Modern browsers block audio (or videos with... | [
0.633519172668457,
0.06381253898143768,
-1.3985861539840698,
0.408639520406723,
0.4614720940589905,
-0.46201813220977783,
0.781089723110199,
1.1735578775405884,
-0.8941445350646973,
-0.055856071412563324,
-0.033763691782951355,
0.06725294888019562,
0.11786666512489319,
0.23080360889434814,... |
html/reference/elements/video/index.md | HTML - Elements - video - Events:
- `audioprocess` (deprecated): The input buffer of a `ScriptProcessorNode` is ready to be processed.
- `HTMLMediaElement.canplay_event`: The browser can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for furthe... | [
0.9663786292076111,
-0.22655513882637024,
-1.1856980323791504,
0.4239971935749054,
0.48874813318252563,
-0.40070411562919617,
0.861497700214386,
1.3670638799667358,
-0.9601808190345764,
-0.27222540974617004,
0.2703995108604431,
-0.08893223851919174,
-0.3149200975894928,
0.42164134979248047... |
html/reference/elements/video/index.md | HTML - Elements - video - Usage notes:
Browsers don't all support the same video formats; you can provide multiple sources inside nested `source` elements, and the browser will then use the first one it understands.
Example:
<video controls>
<source src="myVideo.webm" type="video/webm" />
<source src="myVideo.mp... | [
0.5276585817337036,
-0.41689422726631165,
-0.909774124622345,
0.6861138343811035,
0.3278443217277527,
-0.38475197553634644,
0.956027090549469,
1.468369722366333,
-1.063988447189331,
-0.07321417331695557,
0.21735283732414246,
-0.14094328880310059,
0.7551007270812988,
0.40604954957962036,
... |
html/reference/elements/video/index.md | HTML - Elements - video - Usage notes - Styling with CSS:
The `<video>` element is a replaced element — its `display` value is `inline` by default — but its default width and height in the viewport is defined by the video being embedded.
There are no special considerations for styling `<video>`; a common strategy is ... | [
-0.25114139914512634,
-0.7399585247039795,
-0.68855220079422,
0.37371450662612915,
0.2337801456451416,
-0.4888351857662201,
0.2831125259399414,
1.8410499095916748,
-0.2460196316242218,
0.2729550898075104,
0.6720541715621948,
-0.01445993036031723,
0.4368268847465515,
-0.12342625856399536,
... |
html/reference/elements/video/index.md | HTML - Elements - video - Usage notes - Adding subtitles and other timed text tracks:
Timed text tracks for subtitles, closed captions, chapter headings, and so on, can be added declaratively by nesting the `track` element. The tracks are specified in Web Video Text Tracks File Format (WebVTT) (`.vtt` files).
For exa... | [
-0.8343428373336792,
-0.6692876219749451,
0.1943737417459488,
0.9869108200073242,
0.16257983446121216,
-0.2622899115085602,
0.5272387862205505,
0.8480002284049988,
-0.39618587493896484,
-0.028952330350875854,
0.10656540095806122,
-0.6821240186691284,
0.14173632860183716,
0.4680148363113403... |
html/reference/elements/video/index.md | HTML - Elements - video - Usage notes - Detecting track addition and removal:
You can detect when tracks are added to and removed from a `<video>` element using the `addtrack` and `removetrack` events. However, these events aren't sent directly to the `<video>` element itself. Instead, they're sent to the track list o... | [
0.25536519289016724,
-0.8325083255767822,
-0.5037697553634644,
1.2769831418991089,
0.0006017014384269714,
-1.343907356262207,
-0.3229912221431732,
1.1533516645431519,
-0.6598801016807556,
0.4196309745311737,
0.024041838943958282,
-0.28936392068862915,
-0.31695669889450073,
0.32567873597145... |
html/reference/elements/video/index.md | HTML - Elements - video - Usage notes - Server support for video:
If the MIME type for the video is not set correctly on the server, the video may not show or show a gray box containing an X (if JavaScript is enabled).
If you use Apache Web Server to serve WebM videos, you can fix this problem by adding the video fil... | [
-0.7104860544204712,
-1.0272624492645264,
-0.43958306312561035,
-0.060108453035354614,
-0.19359639286994934,
-0.7965413331985474,
0.6199273467063904,
1.9975957870483398,
-0.7606791257858276,
-0.4033980667591095,
0.3706064820289612,
-0.5504543781280518,
-0.30422401428222656,
-0.258094310760... |
html/reference/elements/video/index.md | HTML - Elements - video - Accessibility:
Videos should provide both captions and transcripts that accurately describe their content (see Adding captions and subtitles to HTML video for more information on how to implement these). Captions allow people who are experiencing hearing loss to understand a video's audio con... | [
0.32236579060554504,
-0.4477076530456543,
-0.44096237421035767,
0.8351484537124634,
0.10258625447750092,
-0.5055098533630371,
0.08649150282144547,
2.2301793098449707,
-0.482559472322464,
0.46835997700691223,
-0.00849204696714878,
-0.5256238579750061,
-0.021099161356687546,
-0.1647935807704... |
html/reference/elements/video/index.md | HTML - Elements - video - Examples - Single source:
This example plays a video when activated, providing the user with the browser's default video controls to control playback. | [
0.50398850440979,
-0.1684851050376892,
-1.8497178554534912,
0.22488778829574585,
-1.1124348640441895,
-0.13351306319236755,
1.8075904846191406,
1.9691438674926758,
-0.7313541173934937,
-0.2874803841114044,
0.3708202540874481,
-0.6869561076164246,
-0.07120361924171448,
-0.6774381399154663,
... |
html/reference/elements/video/index.md | HTML - Elements - video - Examples - Single source - HTML:
Example:
<!-- Basic video example -->
<!-- 'Big Buck Bunny' licensed under CC 3.0 by the Blender foundation. Hosted by archive.org -->
<!-- Poster from peach.blender.org -->
<video
controls
src="https://archive.org/download/BigBuckBunny_124/Content/big_bu... | [
-0.994209885597229,
-0.25735464692115784,
-0.25335848331451416,
0.556140661239624,
0.12164926528930664,
-0.5358393788337708,
0.39901280403137207,
1.827451229095459,
-0.5132248401641846,
0.09280143678188324,
-0.036202043294906616,
0.30907922983169556,
0.541551947593689,
-0.2810843586921692,... |
html/reference/elements/video/index.md | HTML - Elements - video - Examples - Multiple sources:
This example builds on the last one, offering three different sources for the media; this allows the video to be watched regardless of which video codecs are supported by the browser. | [
0.6430842876434326,
-0.1427897810935974,
-1.190140962600708,
0.1636827439069748,
-0.3899935185909271,
0.38593021035194397,
1.2994743585586548,
1.0938726663589478,
-0.6130655407905579,
-1.3184971809387207,
0.4285561442375183,
-0.31970512866973877,
-0.24033646285533905,
-0.7375176548957825,
... |
html/reference/elements/video/index.md | HTML - Elements - video - Examples - Multiple sources - HTML:
Example:
<!-- Using multiple sources as fallbacks for a video tag -->
<!-- 'Elephants Dream' by Orange Open Movie Project Studio, licensed under CC-3.0, hosted by archive.org -->
<!-- Poster hosted by Wikimedia -->
<video
width="620"
controls
poster=... | [
-1.2059507369995117,
-0.386157363653183,
0.038516245782375336,
0.015709083527326584,
-0.08567014336585999,
-0.04262204095721245,
0.5359333753585815,
1.5965176820755005,
-0.8127711415290833,
0.0787002444267273,
0.494955837726593,
-0.4142787754535675,
0.08311303704977036,
-0.2690144181251526... |
html/reference/elements/select/index.md | HTML - Elements - select:
The `<select>` HTML element represents a control that provides a menu of options.
Example:
<label for="pet-select">Choose a pet:</label>
<select name="pets" id="pet-select">
<option value="">--Please choose an option--</option>
<option value="dog">Dog</option>
<option value="cat">Cat... | [
-0.4928898215293884,
-0.8295671343803406,
-0.7025710344314575,
1.0760679244995117,
0.16361579298973083,
-1.6103696823120117,
-0.06571029126644135,
0.7593398690223694,
-1.102755069732666,
0.39909833669662476,
0.526704728603363,
0.5395020246505737,
0.561677098274231,
0.28555601835250854,
-... |
html/reference/elements/select/index.md | HTML - Elements - select - Attributes:
This element includes the global attributes.
- `autocomplete`: A string providing a hint for a `user agent's` autocomplete feature. See The HTML autocomplete attribute for a complete list of values and details on how to use autocomplete.
- `autofocus`: This Boolean attribute let... | [
0.24840213358402252,
-0.8058053255081177,
-0.9564414620399475,
0.8854761123657227,
0.61066734790802,
-1.1745067834854126,
0.6989719271659851,
1.171937346458435,
-0.36708012223243713,
0.4703327715396881,
-0.4559607207775116,
0.5655004382133484,
0.28851160407066345,
-0.14368927478790283,
-... |
html/reference/elements/select/index.md | HTML - Elements - select - Usage notes - Options inside wrapper elements:
The `<select>` element builds its list of options from all `<option>` descendants, not just its direct children. This means that options can be wrapped in other elements, such as `div` elements, and they will still appear as selectable options i... | [
-0.6450365781784058,
0.06330625712871552,
-1.6287434101104736,
1.1224884986877441,
-0.6636186838150024,
-1.674670934677124,
1.8033369779586792,
0.5955736041069031,
-0.10199852287769318,
0.34124845266342163,
-0.19037939608097076,
0.25147145986557007,
-0.5914005041122437,
-0.3275404572486877... |
html/reference/elements/select/index.md | HTML - Elements - select - Usage notes - Selecting multiple options:
On a desktop computer, there are a number of ways to select multiple options in a `<select>` element with a `multiple` attribute:
Mouse users can hold the Ctrl, Command, or Shift keys (depending on what makes sense for your operating system) and the... | [
0.21865147352218628,
-0.00271048117429018,
-0.6777356266975403,
0.7936438322067261,
0.6056354641914368,
-0.28639233112335205,
0.9824411869049072,
0.9865366220474243,
0.9755003452301025,
0.6176125407218933,
0.028602272272109985,
-0.1075066402554512,
-0.2035066932439804,
0.05917452275753021,... |
html/reference/elements/select/index.md | HTML - Elements - select - Styling with CSS:
The `<select>` element has historically been difficult to style effectively with CSS. The following guides contain information about features that enable fully customizable select elements:
- Customizable select elements
- Customizable select listboxes | [
-0.000004085261025466025,
0.05378364771604538,
-0.8374282717704773,
0.33403193950653076,
-0.024043075740337372,
-1.9023172855377197,
0.9072893261909485,
0.9412717819213867,
-0.4236889183521271,
0.9211147427558899,
0.47893601655960083,
-0.1441059708595276,
-0.2538079023361206,
0.19507655501... |
html/reference/elements/select/index.md | HTML - Elements - select - Styling with CSS - Legacy select styling:
In browsers that don't support the modern customization features (or legacy codebases where they can't be used), you are limited to manipulating the box model, the displayed font, etc. You can also use the `appearance` property to remove the default ... | [
-0.2171972692012787,
-0.6069897413253784,
-0.20267120003700256,
0.25496211647987366,
0.35255423188209534,
-1.521560788154602,
0.31164097785949707,
1.2377349138259888,
-0.22552117705345154,
0.4784603416919708,
-0.1950690597295761,
0.19854211807250977,
-0.0505731962621212,
-0.551400780677795... |
html/reference/elements/select/index.md | HTML - Elements - select - Accessibility:
The `<hr>` within a `<select>` should be considered purely decorative, as they are currently not exposed within the accessibility tree and therefore not exposed to assistive technologies. | [
-1.1930899620056152,
0.6913352012634277,
-0.7451973557472229,
0.4983176589012146,
-0.45202672481536865,
-1.7968604564666748,
0.8752655386924744,
0.7037164568901062,
0.11802832782268524,
0.40447455644607544,
0.4211823344230652,
-0.4566720426082611,
0.7118132710456848,
-0.21557213366031647,
... |
html/reference/elements/select/index.md | HTML - Elements - select - Examples - Basic select:
The following example creates a three-value dropdown menu. The second option includes the `selected` attribute, making that option selected by default.
Example:
<select name="choice">
<option value="first">First Value</option>
<option value="second" selected>Se... | [
-0.2863367199897766,
0.07976727932691574,
-1.5774952173233032,
0.4591706395149231,
-0.07437638193368912,
-0.2597983479499817,
2.295114040374756,
1.2579383850097656,
-0.4205397069454193,
0.2016870379447937,
0.5737633109092712,
-0.3782610595226288,
-0.02513905242085457,
-0.4185517132282257,
... |
html/reference/elements/select/index.md | HTML - Elements - select - Examples - Select with grouping options:
The following example creates a dropdown menu with grouping using `optgroup` and `hr` to make it easier for the user to understand the content in the dropdown.
Example:
<label for="hr-select">Your favorite food</label> <br />
<select name="foods" i... | [
-1.0190380811691284,
-0.8487173914909363,
-0.06436602026224136,
1.36075758934021,
0.36010417342185974,
-0.5600393414497375,
0.9101980924606323,
1.1847997903823853,
-0.34614109992980957,
0.7567437291145325,
0.200285866856575,
-0.33972203731536865,
-0.4933757185935974,
0.4261283576488495,
... |
html/reference/elements/select/index.md | HTML - Elements - select - Examples - Advanced select with multiple features:
The following example is more complex, showing off more features you can use on a `<select>` element:
- The `multiple` attribute enables selecting more than one option.
- The `size` attribute is set to `4`, which means 4 lines are displayed... | [
-0.052296582609415054,
-0.4206504821777344,
-0.6520493030548096,
0.7198211550712585,
-0.1906530261039734,
-0.8743619918823242,
0.6043176651000977,
0.7620061635971069,
-0.45972979068756104,
0.41689178347587585,
0.3418448567390442,
-0.3618524670600891,
-0.1870156079530716,
0.2392898201942443... |
html/reference/elements/q/index.md | HTML - Elements - q:
The `<q>` HTML element indicates that the enclosed text is a short inline quotation. Most modern browsers implement this by surrounding the text in quotation marks. This element is intended for short quotations that don't require paragraph breaks; for long quotations use the `blockquote` element.
... | [
-0.8429811596870422,
-0.02101430669426918,
0.4051883816719055,
0.3140030801296234,
0.2824024558067322,
-1.773712396621704,
1.3990567922592163,
1.0853099822998047,
-0.13139283657073975,
0.7289735674858093,
-0.47962284088134766,
0.31654196977615356,
-0.21389800310134888,
0.3830452859401703,
... |
html/reference/elements/q/index.md | HTML - Elements - q - Attributes:
This element includes the global attributes.
- `cite`: The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote. | [
-1.3840543031692505,
0.2920980453491211,
-0.8360856771469116,
-0.12476898729801178,
-0.4586648643016815,
-1.9034545421600342,
1.036486029624939,
0.7471930980682373,
0.5233320593833923,
0.016769878566265106,
0.10156145691871643,
0.5758528113365173,
-0.8782938122749329,
0.7516605854034424,
... |
html/reference/elements/q/index.md | HTML - Elements - q - Examples:
Example:
<p>
According to Mozilla's website,
<q cite="https://www.mozilla.org/en-US/about/history/details/"
>Firefox 1.0 was released in 2004 and became a big success.</q
>
</p> | [
0.003970846999436617,
1.1139073371887207,
-0.8126723766326904,
0.5055161714553833,
0.14970041811466217,
-0.1697116196155548,
1.0317684412002563,
0.9521214365959167,
-0.32803964614868164,
0.45850232243537903,
0.17649495601654053,
-0.5752091407775879,
-0.2584710121154785,
-0.5065462589263916... |
html/reference/elements/audio/index.md | HTML - Elements - audio:
The `<audio>` HTML element is used to embed sound content in documents. It may contain one or more audio sources, represented using the `src` attribute or the `source` element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a `MediaStrea... | [
-0.22400470077991486,
-0.30394649505615234,
-0.725849986076355,
1.521335482597351,
0.26644259691238403,
-0.62012779712677,
0.33054348826408386,
1.3515700101852417,
-0.07243363559246063,
0.1879747211933136,
0.1277739256620407,
-0.5470706224441528,
-0.651414692401886,
-0.4833953082561493,
... |
html/reference/elements/audio/index.md | HTML - Elements - audio - Attributes:
This element's attributes include the global attributes.
- `autoplay`: A Boolean attribute: if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading. Note: Sites that automatically play audi... | [
0.6049826741218567,
0.12753736972808838,
-1.084872841835022,
0.4836425185203552,
0.6261578798294067,
-0.44436222314834595,
1.3574004173278809,
0.8077226877212524,
-0.5081765651702881,
-0.008111448958516121,
-0.0815587192773819,
0.2566829025745392,
-0.16184251010417938,
-0.04021356254816055... |
html/reference/elements/audio/index.md | HTML - Elements - audio - Events:
- `audioprocess` (deprecated): The input buffer of a `ScriptProcessorNode` is ready to be processed.
- `HTMLMediaElement.canplay_event`: The browser can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for furthe... | [
0.8020316958427429,
-0.11736074835062027,
-1.098699927330017,
0.4882246255874634,
0.424885094165802,
-0.5812361240386963,
0.6927831172943115,
1.048972725868225,
-0.6311218738555908,
-0.3226569592952728,
0.11343531310558319,
-0.21163176000118256,
-0.30993422865867615,
0.3914969563484192,
... |
html/reference/elements/audio/index.md | HTML - Elements - audio - Usage notes:
Browsers don't all support the same file types and audio codecs; you can provide multiple sources inside nested `source` elements, and the browser will then use the first one it understands:
Example:
<audio controls>
<source src="myAudio.mp3" type="audio/mpeg" />
<source sr... | [
0.2904072403907776,
-0.3240729868412018,
-1.2325701713562012,
0.6491168737411499,
0.2206026315689087,
-0.7535702586174011,
0.11359119415283203,
1.222882866859436,
-0.058846235275268555,
0.2908371090888977,
-0.07450948655605316,
-0.2995782494544983,
-0.3474596440792084,
0.06076411157846451,... |
html/reference/elements/audio/index.md | HTML - Elements - audio - Usage notes - Styling with CSS:
The `<audio>` element has no intrinsic visual output of its own unless the `controls` attribute is specified, in which case the browser's default controls are shown.
The default controls have a `display` value of `inline` by default, and it is often a good ide... | [
-0.34654107689857483,
-0.43498438596725464,
-1.0268967151641846,
1.0402536392211914,
0.26315146684646606,
-0.997369110584259,
0.15227314829826355,
1.811642050743103,
0.0912821888923645,
0.7280100584030151,
0.19674095511436462,
-0.23230837285518646,
-0.21388466656208038,
-0.5799469947814941... |
html/reference/elements/audio/index.md | HTML - Elements - audio - Usage notes - Detecting addition and removal of tracks:
You can detect when tracks are added to and removed from an `<audio>` element using the `addtrack` and `removetrack` events. However, these events aren't sent directly to the `<audio>` element itself. Instead, they're sent to the track l... | [
0.07200175523757935,
-0.6709849238395691,
-0.7839218974113464,
1.181410551071167,
-0.1730332374572754,
-1.4726617336273193,
-0.22908972203731537,
1.3276547193527222,
-0.6850467920303345,
0.6625139117240906,
0.19561679661273956,
-0.14421488344669342,
-0.5372694134712219,
0.3951707184314728,... |
html/reference/elements/audio/index.md | HTML - Elements - audio - Accessibility:
Audio with spoken dialog should provide both captions and transcripts that accurately describe its content. Captions, which are specified using WebVTT, allow people who are hearing impaired to understand an audio recording's content as the recording is being played, while trans... | [
-0.05545707792043686,
-0.04383423924446106,
-0.8738301396369934,
0.9211075305938721,
0.4734728932380676,
-0.8509423136711121,
0.9691646099090576,
0.6532096862792969,
-0.6714956760406494,
0.2061769962310791,
0.08720917999744415,
-0.10739670693874359,
-0.4155738353729248,
-0.1210970878601074... |
html/reference/elements/audio/index.md | HTML - Elements - audio - Examples - Basic usage:
The following example shows basic usage of the `<audio>` element to play an OGG file. It will autoplay due to the `autoplay` attribute—if the page has permission to do so—and also includes fallback content.
Example:
<!-- Basic audio playback -->
<audio src="AudioTest... | [
-0.8612126111984253,
0.4146493673324585,
-1.710595726966858,
-0.4209713041782379,
-0.08641250431537628,
-0.7162957191467285,
1.9481192827224731,
0.6110311150550842,
-0.7361094355583191,
0.21864774823188782,
-0.014521829783916473,
-0.8463675379753113,
-0.6289529204368591,
0.0130457803606987... |
html/reference/elements/audio/index.md | HTML - Elements - audio - Examples - audio> element with source> element:
This example specifies which audio track to embed using the `src` attribute on a nested `<source>` element rather than directly on the `<audio>` element. It is always useful to include the file's MIME type inside the `type` attribute, as the bro... | [
-0.3359295129776001,
0.03055620938539505,
-1.2124544382095337,
0.3324950933456421,
-0.2342330366373062,
-0.8980811834335327,
1.467036247253418,
0.9187583327293396,
0.0801476389169693,
0.21931512653827667,
0.3153887391090393,
-0.7302709221839905,
-0.7711887359619141,
-0.5783588290214539,
... |
html/reference/elements/audio/index.md | HTML - Elements - audio - Examples - audio> with multiple source> elements:
This example includes multiple `<source>` elements. The browser tries to load the first source element (Opus) if it is able to play it; if not it falls back to the second (Vorbis) and finally back to MP3:
Example:
<audio controls>
<source ... | [
-0.09353044629096985,
0.7966984510421753,
-1.866800308227539,
0.17374058067798615,
-0.26401567459106445,
-0.7747049331665039,
1.5655426979064941,
1.3274248838424683,
-0.39934420585632324,
0.09770525246858597,
0.16526690125465393,
-0.4460547864437103,
-0.28201326727867126,
-0.74046880006790... |
html/reference/elements/selectedcontent/index.md | HTML - Elements - selectedcontent:
The `<selectedcontent>` HTML is used inside a `select` element to display the contents of its currently selected `option` within its first child `button`. This enables you to style all parts of a `<select>` element, referred to as "customizable selects". | [
-0.061260469257831573,
-0.06409373879432678,
-1.0921934843063354,
1.2653552293777466,
0.12007902562618256,
-1.4655574560165405,
1.5132273435592651,
0.3773808777332306,
-0.5845010280609131,
0.7143593430519104,
0.4597315788269043,
0.3438261151313782,
-0.5576919913291931,
-0.11320602893829346... |
html/reference/elements/selectedcontent/index.md | HTML - Elements - selectedcontent - Attributes:
This element includes the global attributes. | [
-0.24929672479629517,
0.2716573178768158,
-0.9360097646713257,
0.8331584334373474,
-1.1229063272476196,
-1.3351876735687256,
0.5748233199119568,
0.9057831168174744,
-0.24165958166122437,
0.298185259103775,
0.16564659774303436,
0.2699083983898163,
-0.7257798314094543,
0.5104190111160278,
... |
html/reference/elements/selectedcontent/index.md | HTML - Elements - selectedcontent - Description:
You use the `<selectedcontent>` element as the only child of a `button` element, which must be the first child of the `select` element. Any `option` element, the only other valid child of `<select>`, must come after the `<button>` and nested `<selectedcontent>` pair.
E... | [
0.05018937960267067,
0.29556941986083984,
-0.7431333065032959,
1.1594734191894531,
-0.29751867055892944,
-1.3218872547149658,
1.9975287914276123,
1.0968189239501953,
-0.5015811920166016,
0.3536885380744934,
0.6199518442153931,
-0.3635559380054474,
-1.0257039070129395,
-0.026959586888551712... |
html/reference/elements/selectedcontent/index.md | HTML - Elements - selectedcontent - Description - How `<selectedcontent>` works behind the scenes:
The `<selectedcontent>` element contains a clone of the content of the currently selected `option`. The browser renders this clone using `cloneNode()`. When the selected `<option>` changes, such as during a `change` even... | [
-0.7795879244804382,
-0.5295256972312927,
0.2187613844871521,
1.2073830366134644,
0.6807857155799866,
-0.34993454813957214,
1.1188315153121948,
0.8280161619186401,
0.12426295876502991,
0.46750763058662415,
0.21397747099399567,
-0.44265493750572205,
-0.8017821907997131,
0.25712764263153076,... |
html/reference/elements/selectedcontent/index.md | HTML - Elements - selectedcontent - Description - `<selectedcontent>` inertness:
By default, any `<button>` inside a `<select>` element is inert. As a result, all content inside that button—including `<selectedcontent>`—is also inert. This means users can't interact with or focus on content inside `<selectedcontent>`. | [
0.2078063189983368,
0.1602645367383957,
-0.9482791423797607,
0.8689521551132202,
-0.2652199864387512,
-1.9209039211273193,
0.34910640120506287,
1.2089247703552246,
-0.5605478286743164,
0.3955046534538269,
0.6774640083312988,
0.31516966223716736,
-0.7747918367385864,
-0.1590215265750885,
... |
html/reference/elements/selectedcontent/index.md | HTML - Elements - selectedcontent - Description - Styling the selected option's content with CSS:
You can target the content of the currently selected `<option>` element and style how it appears inside the select button. Styling the button doesn't affect the styling of the content of the `<option>` that was cloned. Th... | [
-0.3820476531982422,
-0.5439603924751282,
-0.08222143352031708,
1.009914755821228,
0.3591574430465698,
-1.1060463190078735,
0.5746688842773438,
1.2693363428115845,
0.15961124002933502,
1.1796554327011108,
0.35578498244285583,
0.046665869653224945,
-0.6043540239334106,
0.10333898663520813,
... |
html/reference/elements/selectedcontent/index.md | HTML - Elements - selectedcontent - Examples:
You can see a full example that includes the `<selectedcontent>` element in our Customizable select elements guide. | [
0.6876260638237,
-0.0926792174577713,
-1.0355368852615356,
0.6265050172805786,
-0.09830813854932785,
-1.212460994720459,
1.3026822805404663,
1.5738418102264404,
-0.684327244758606,
0.5613564252853394,
1.0122076272964478,
-0.09241874516010284,
-0.4408971667289734,
0.0699661374092102,
-1.0... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog:
The `<dialog>` HTML element represents a modal or non-modal dialog box or other interactive component, such as a dismissible alert, inspector, or subwindow. | [
-0.10054170340299606,
-0.7440350651741028,
-0.31448033452033997,
-0.18034887313842773,
-1.1682438850402832,
-1.2366937398910522,
1.0772013664245605,
0.51393723487854,
0.06750532984733582,
0.2542363405227661,
0.16961298882961273,
-0.9473506808280945,
-0.3385586440563202,
0.33816686272621155... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Attributes:
This element includes the global attributes.
Warning: The `tabindex` attribute must not be used on the `<dialog>` element. See Additional notes.
- `closedby`: Specifies the types of user actions that can be used to close the `<dialog>` element. This attribute distinguishes thre... | [
0.2315331995487213,
-0.4353460967540741,
0.07132428139448166,
0.6748927235603333,
-0.39004167914390564,
-1.0539377927780151,
0.3029504716396332,
0.8709386587142944,
-0.45276784896850586,
0.7135694622993469,
-0.5651947259902954,
0.18132993578910828,
-0.13450200855731964,
0.07118642330169678... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Description:
The HTML `<dialog>` element is used to create both modal and non-modal dialog boxes. Modal dialog boxes block interaction with other UI elements, making the rest of the page inert, while non-modal dialog boxes allow interaction with the rest of the page. | [
0.10065747797489166,
-0.041152045130729675,
-0.7020169496536255,
0.11725161969661713,
-0.6269393563270569,
-0.8374638557434082,
0.8679322004318237,
0.5856199860572815,
-0.009130001068115234,
0.3992772400379181,
-0.021585652604699135,
-0.38998472690582275,
0.071619912981987,
-0.072425700724... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Description - Controlling dialogs using JavaScript:
JavaScript can be used to display and close the `<dialog>` element. You can use the `showModal()` method to display a modal dialog and the `show()` method to display a non-modal dialog. The dialog box can be closed using the `close()` metho... | [
-0.22725753486156464,
-0.2790773808956146,
0.004920054227113724,
-0.06870441883802414,
-1.1091030836105347,
-0.9790172576904297,
1.2322661876678467,
0.9055866599082947,
-0.4329055845737457,
0.44190943241119385,
-0.20752719044685364,
0.3919241428375244,
0.2935331463813782,
0.221231877803802... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Description - Modal dialogs using invoker commands:
Modal dialogs can be declaratively opened and closed using the Invoker Commands API HTML attributes `commandfor` and `command`, which can be set on `button` elements.
The `command` attribute sets the particular command that is to be sent w... | [
-0.13734371960163116,
-0.03254983574151993,
-0.7912520170211792,
0.8551154732704163,
-0.37631216645240784,
-1.0477100610733032,
0.5011151432991028,
1.121207594871521,
-0.11215024441480637,
0.4670328199863434,
-0.696948230266571,
0.5736405253410339,
0.0062522850930690765,
0.0662360563874244... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Description - Non-modal dialogs using popover commands:
Non-modal dialogs can be declaratively opened, closed, and toggled using the Popover API HTML attributes `popovertarget` and `popovertargetaction`, which can be defined on `button` and `input` elements.
The `<dialog>` must be turned in... | [
-0.1951746940612793,
-0.2864462733268738,
-0.3221302330493927,
0.8688033223152161,
-0.2519892156124115,
-0.745349109172821,
0.5645263195037842,
1.3257585763931274,
0.497688889503479,
0.5153732299804688,
-0.768927276134491,
0.3045029640197754,
0.12564001977443695,
0.0025624893605709076,
0... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Description - Closing dialogs:
It is important to provide a closing mechanism for every `<dialog>` element, and to ensure that this works on devices that might not have a physical keyboard.
There are numerous ways to close a dialog:
- Submitting the form within the `<dialog>` element with ... | [
0.20658522844314575,
0.40027183294296265,
-0.428873211145401,
-0.22856281697750092,
-1.3047261238098145,
-1.0812469720840454,
1.7929518222808838,
-0.0647018700838089,
0.06693528592586517,
0.1387481987476349,
-0.023698346689343452,
0.4225212037563324,
0.17506851255893707,
0.4422523677349090... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Description - CSS Styling:
A `<dialog>` can be selected using its element name (like any other element), and you can also match its state using pseudo-classes such as `:modal` and `:open`.
The CSS `::backdrop` pseudo-element can be used to style the backdrop of a modal dialog, which is disp... | [
-0.38270965218544006,
-0.9673786163330078,
-0.36764201521873474,
0.15201795101165771,
-0.3848761320114136,
-1.323756217956543,
1.3337637186050415,
0.4990760087966919,
-0.5234567523002625,
0.6567949056625366,
-0.02393186092376709,
0.14036241173744202,
-0.3600299060344696,
0.1111193895339965... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Description - Additional notes:
- HTML `form` elements can be used to close a dialog box if they have the attribute `method="dialog"` or if the button used to submit the form has `formmethod="dialog"` set. When a `<form>` within a `<dialog>` is submitted via the `dialog` method, the dialog b... | [
0.26133719086647034,
-0.0685967355966568,
-0.2517552375793457,
-0.08265358209609985,
-1.300144910812378,
-1.6387760639190674,
1.890332818031311,
0.3326647877693176,
-0.3389822244644165,
0.25225630402565,
0.20538833737373352,
0.32203394174575806,
0.5127456188201904,
0.5293024778366089,
-0... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Accessibility:
When implementing a dialog, it is important to consider the most appropriate place to set user focus. When using `HTMLDialogElement.showModal()` to open a `<dialog>`, focus is set on the first nested focusable element. Explicitly indicating the initial focus placement by using... | [
0.8975471258163452,
-1.001051902770996,
-0.23474565148353577,
0.7083446383476257,
-0.3675942122936249,
-0.9408611059188843,
0.05614040791988373,
0.9117660522460938,
0.2865571975708008,
0.450775146484375,
-0.5105975270271301,
0.20978060364723206,
-0.00314176082611084,
0.34521690011024475,
... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Invoker Command API HTML attributes:
This example demonstrates how you can use open and close a modal dialog using the `commandfor` and `command` HTML attributes of the Invoker Commands API.
First, we declare a `button` element, setting the `command` attribute to `"show-modal"`, ... | [
-0.26368623971939087,
-0.02452142909169197,
-0.8153518438339233,
0.9955927133560181,
-0.34132859110832214,
-1.5549854040145874,
0.020600009709596634,
1.2982282638549805,
-0.6185380220413208,
0.6993795037269592,
-0.5309072732925415,
0.47771286964416504,
0.13884659111499786,
0.05402453243732... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Popover API HTML attributes:
This example demonstrates how you can open and close a non-modal dialog using the `popover`, `popovertarget`, and `popovertargetaction` HTML attributes of the Popover API.
The `<dialog>` is turned into a popover by adding the `popover` attribute. Sinc... | [
-0.4737873375415802,
-0.6487990021705627,
-0.30127060413360596,
1.3326727151870728,
-0.5024824738502502,
-1.0976178646087646,
0.40290915966033936,
1.3656597137451172,
0.3001772463321686,
0.5076815485954285,
-0.6961749196052551,
0.4343576431274414,
0.19333942234516144,
0.08298033475875854,
... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Using the dialog `open` attribute:
This example demonstrates how you can set the boolean `open` attribute on a `<dialog>` element, in order to create an HTML-only non-modal dialog that is already open when the page loads.
The dialog can be closed by clicking the "OK" button becau... | [
0.18647632002830505,
-0.07002358138561249,
-0.46242833137512207,
0.7764561772346497,
-0.6941157579421997,
-0.8606412410736084,
0.9929031133651733,
0.277296781539917,
-0.699813961982727,
0.2691201865673065,
-0.4426474869251251,
-0.3159182667732239,
0.4727146029472351,
0.41333162784576416,
... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Creating a modal dialog:
This example demonstrates a modal dialog with a gradient backdrop. The `.showModal()` method opens the modal dialog when the "Show the dialog" button is activated. The dialog can be closed by pressing the Esc key or via the `close()` method when the "Close... | [
0.35733532905578613,
-0.3253326714038849,
-0.2628626823425293,
-0.03298423811793327,
-0.9676879048347473,
-0.7559446096420288,
1.7482542991638184,
0.8483862280845642,
-0.2199288308620453,
0.418938547372818,
-0.15633676946163177,
0.6421952247619629,
-0.24831365048885345,
0.6106292009353638,... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Creating a modal dialog - HTML:
Example:
<dialog>
<button autofocus>Close</button>
<p>This modal dialog has a groovy backdrop!</p>
</dialog>
<button>Show the dialog</button> | [
-0.42288458347320557,
0.0858755111694336,
-0.09789467602968216,
-0.009770259261131287,
-0.9413085579872131,
-0.8141592741012573,
1.4263101816177368,
0.5543531179428101,
-0.16147375106811523,
0.2837999165058136,
-0.09907212108373642,
0.22712862491607666,
0.04354885220527649,
0.1677588522434... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Creating a modal dialog - CSS:
We can style the backdrop of the dialog by using the `::backdrop` pseudo-element.
Example:
::backdrop {
background-image: linear-gradient(
45deg,
magenta,
rebeccapurple,
dodgerblue,
green
);
opacity: 0.75;
} | [
-0.2838662564754486,
-0.48203784227371216,
-0.29108673334121704,
-0.5226666927337646,
-0.41238799691200256,
-0.8684656023979187,
1.2670271396636963,
0.8926218748092651,
-0.18278196454048157,
0.30824974179267883,
-0.3385432958602905,
-0.26488929986953735,
-0.10007475316524506,
0.10111743211... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Creating a modal dialog - JavaScript:
The dialog is opened modally using the `.showModal()` method and closed using the `.close()` or `.requestClose()` methods.
Example:
const dialog = document.querySelector("dialog");
const showButton = document.querySelector("dialog + button")... | [
-0.007151768542826176,
-0.30576929450035095,
-0.435342013835907,
0.27128082513809204,
-0.8628270030021667,
-0.8879556059837341,
0.8142522573471069,
0.12532107532024384,
-0.6931235194206238,
0.3997695744037628,
-0.284568190574646,
0.31998878717422485,
-0.03591275215148926,
0.625932633876800... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Handling the return value from the dialog:
This example demonstrates the `returnValue` of the `<dialog>` element and how to close a modal dialog by using a form. By default, the `returnValue` is the empty string or the value of the button that submits the form within the `<dialog>... | [
-0.016352687031030655,
0.23056457936763763,
-0.18947339057922363,
0.16285857558250427,
-0.9297279715538025,
-0.9999024271965027,
1.84873628616333,
1.1292698383331299,
-0.47128596901893616,
0.5223656892776489,
0.08548412472009659,
0.4261671304702759,
-0.39720419049263,
1.109648585319519,
... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Handling the return value from the dialog - HTML:
Example:
<!-- A modal dialog containing a form -->
<dialog id="favDialog">
<form>
<p>
<label>
Favorite animal:
<select>
<option value="default">Choose…</option>
<option>Brine shrimp<... | [
-0.6187006235122681,
-0.44679340720176697,
-0.058844488114118576,
0.5933998227119446,
-0.49413779377937317,
-0.5509474277496338,
0.3537738025188446,
0.8674148917198181,
-0.790524959564209,
0.17635349929332733,
-0.02162216603755951,
-0.00593167170882225,
0.2296525239944458,
0.17107942700386... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Handling the return value from the dialog - JavaScript:
The dialog is opened using an event listener on the "Show the dialog" button, which calls `HTMLDialogElement.showModal()` when the button is clicked.
The dialog is closed when the "Cancel" button is clicked, because the `<bu... | [
0.35204243659973145,
-0.4618260860443115,
-0.5288546681404114,
0.1733652502298355,
-0.1246224194765091,
-1.0418139696121216,
0.3658294677734375,
1.4462555646896362,
-0.5740566253662109,
0.27867355942726135,
-0.6491171717643738,
0.5642880201339722,
-0.35121190547943115,
0.05065485090017319,... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Closing a dialog with a required form input:
When a form inside a dialog has a required input, the user agent will only let you close the dialog once you provide a value for the required input. To close such dialog, either use the `formnovalidate` attribute on the close button or ... | [
0.008309670723974705,
-0.2883607745170593,
-0.48026591539382935,
0.44470539689064026,
-0.26578861474990845,
-0.760947585105896,
0.667844295501709,
0.6005452275276184,
-0.28410738706588745,
-0.11931857466697693,
-0.1396946907043457,
-0.05307172238826752,
0.17644615471363068,
0.0878043025732... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Closing a dialog with a required form input - JavaScript:
Example:
const showBtn = document.getElementById("show-dialog");
const dialog = document.getElementById("dialog");
const jsCloseBtn = dialog.querySelector("#js-close");
showBtn.addEventListener("click", () => {
dialog.s... | [
0.2240045815706253,
-0.40593427419662476,
-0.41453224420547485,
0.47766971588134766,
-0.5010298490524292,
-0.7288329601287842,
0.32240912318229675,
0.47209349274635315,
-0.9950066804885864,
0.21374019980430603,
-0.14860329031944275,
0.4312184453010559,
0.027848578989505768,
0.2233853638172... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Comparison of different closedby behaviors:
This example demonstrates the difference in behavior between different values of the `closedby` attribute. | [
-0.019026897847652435,
-0.2781219780445099,
-1.035727858543396,
0.03139159083366394,
-1.5750399827957153,
-0.35551226139068604,
1.3144078254699707,
0.7833147048950195,
-0.10316960513591766,
-0.1119857132434845,
-0.24049146473407745,
-0.7021975517272949,
-0.5716804265975952,
-0.112634174525... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Comparison of different closedby behaviors - HTML:
We provide three `button` elements and three `<dialog>` elements. Each button will be programmed to open a different dialog that demonstrates the behavior of one of the three values of the `closedby` attribute — `none`, `closerequ... | [
-0.2815364897251129,
-0.41017672419548035,
-0.6923719048500061,
0.3036428987979889,
-0.19858387112617493,
-0.9834669232368469,
-0.04618537425994873,
1.0977550745010376,
-0.7603556513786316,
0.6734780073165894,
-0.6955756545066833,
0.7097660899162292,
0.12734663486480713,
0.1663383692502975... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Comparison of different closedby behaviors - JavaScript:
Here we assign different variables to reference the main control `<button>` elements, the `<dialog>` elements, and the "Close" `<button>` elements inside the dialogs. First we assign a `click` event listener to each control ... | [
0.2844412326812744,
-0.43099096417427063,
-0.5538475513458252,
0.9446442723274231,
-0.4407866299152374,
-1.0516117811203003,
0.6148909330368042,
0.9358282089233398,
-0.8619830012321472,
0.9808744192123413,
-0.14986656606197357,
0.7010802030563354,
-0.20699624717235565,
0.11585988104343414,... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Animating dialogs:
`<dialog>`s are set to `display: none;` when hidden and `display: block;` when shown, as well as being removed from / added to the `top layer` and the accessibility tree. Therefore, for `<dialog>` elements to be animated the `display` property needs to be animat... | [
-0.0037303657736629248,
-0.6579198837280273,
0.13324445486068726,
0.5479264855384827,
-0.27967190742492676,
-1.0519527196884155,
0.03140735998749733,
1.0770400762557983,
-0.2889872193336487,
0.7718487977981567,
0.21581526100635529,
-0.19284482300281525,
-0.42456576228141785,
0.337158948183... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Animating dialogs - Transitioning dialog elements:
When animating `<dialog>`s with CSS transitions, the following features are required:
- `@starting-style` at-rule: Provides a set of starting values for properties set on the `<dialog>` that you want to transition from every time... | [
0.11619403958320618,
-0.7915292382240295,
-0.4309973120689392,
1.1036521196365356,
-0.06053086370229721,
-1.287289023399353,
0.2917685806751251,
1.2800687551498413,
0.014936581254005432,
0.49025100469589233,
-0.0006982758641242981,
-0.04011589661240578,
-0.48902028799057007,
0.410445362329... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Animating dialogs - Transitioning dialog elements - HTML:
The HTML contains a `<dialog>` element, plus a button to show the dialog. Additionally, the `<dialog>` element contains another button to close itself.
Example:
<dialog id="dialog">
Content here
<button class="close">... | [
-0.24345451593399048,
-0.181635320186615,
-0.49059247970581055,
0.38965335488319397,
-0.7033376097679138,
-1.5181303024291992,
0.6391788125038147,
0.6248337030410767,
-0.7154572606086731,
0.3512902557849884,
0.045401543378829956,
-0.08474566042423248,
-0.5332993865013123,
0.751843869686126... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Animating dialogs - Transitioning dialog elements - CSS:
In the CSS, we include a `@starting-style` block that defines the transition starting styles for the `opacity` and `transform` properties, transition end styles on the `dialog:open` state, and default styles on the default `... | [
0.21224461495876312,
-0.36501580476760864,
-0.5144648551940918,
0.8116829991340637,
-0.08854161202907562,
-0.8002962470054626,
-0.36065465211868286,
1.331179141998291,
-0.49310919642448425,
0.6457666158676147,
0.08129541575908661,
-0.11912091076374054,
-0.21196560561656952,
0.0602663382887... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Animating dialogs - Transitioning dialog elements - JavaScript:
The JavaScript adds event handlers to the show and close buttons causing them to show and close the `<dialog>` when they are clicked:
Example:
const dialogElem = document.getElementById("dialog");
const showBtn = do... | [
-0.22414140403270721,
-0.4638972282409668,
-0.33971086144447327,
0.3040960133075714,
-0.038313619792461395,
-0.35345566272735596,
0.5555581450462341,
0.4525820314884186,
-0.28661543130874634,
0.24920374155044556,
-0.4120621383190155,
0.014432676136493683,
-0.3523022532463074,
0.65034157037... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Animating dialogs - dialog keyframe animations:
When animating a `<dialog>` with CSS keyframe animations, there are some differences to note from transitions:
- You don't provide a `@starting-style`.
- You include the `display` value in a keyframe; this will be the `display` valu... | [
0.215663880109787,
-0.3835509121417999,
-0.8155689239501953,
0.20072513818740845,
-0.780731201171875,
-0.5156303644180298,
0.8199907541275024,
1.0165833234786987,
-1.0810221433639526,
0.4724136292934418,
0.9347513914108276,
-1.423952341079712,
-0.4316715896129608,
1.1192225217819214,
-1.... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Animating dialogs - dialog keyframe animations - HTML:
First, the HTML contains a `<dialog>` element, plus a button to show the dialog. Additionally, the `<dialog>` element contains another button to close itself.
Example:
<dialog id="dialog">
Content here
<button class="clo... | [
-0.19519637525081635,
-0.21112629771232605,
-0.07539519667625427,
0.16418825089931488,
-0.8308448195457458,
-0.990426242351532,
0.9151695966720581,
0.5207664370536804,
-0.9253675937652588,
0.40799736976623535,
0.14407651126384735,
-0.2611217498779297,
-0.2658499777317047,
0.846512973308563... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Animating dialogs - dialog keyframe animations - CSS:
The CSS defines keyframes to animate between the closed and shown states of the `<dialog>`, plus the fade-in animation for the `<dialog>`'s backdrop. The `<dialog>` animations include animating `display` to make sure the actual... | [
0.5319238901138306,
-0.5277318358421326,
-0.2456013262271881,
0.26389390230178833,
0.18920022249221802,
-1.338652491569519,
-0.5961104035377502,
1.328546404838562,
-0.822864830493927,
0.741973876953125,
-0.17030826210975647,
-0.11486604809761047,
-0.20773272216320038,
0.3094952404499054,
... |
html/reference/elements/dialog/index.md | HTML - Elements - dialog - Examples - Animating dialogs - dialog keyframe animations - JavaScript:
Finally, the JavaScript adds event handlers to the buttons to enable showing and closing the `<dialog>`:
Example:
const dialogElem = document.getElementById("dialog");
const showBtn = document.querySelector(".show");
c... | [
0.3985082805156708,
-0.2764958143234253,
-0.3443261981010437,
0.34925881028175354,
-0.9422814249992371,
-0.9099220037460327,
0.4820038676261902,
0.0669107735157013,
-0.9462149739265442,
0.15475726127624512,
0.303840696811676,
0.44645971059799194,
-0.5995693802833557,
0.7089075446128845,
... |
api/client/url/index.md | API - Client - url:
Note: This feature is available in Web Workers.
The `url` read-only property of the `Client` interface returns the URL of the current service worker client.
Note that the `url` property is not updated unless a new page is actually loaded. This means that it will not be updated if the user navigat... | [
-1.0275310277938843,
0.18608760833740234,
-0.8434134721755981,
-0.33804917335510254,
0.2328016459941864,
-1.0621825456619263,
0.7251783013343811,
0.538059651851654,
-0.14685556292533875,
0.09497997164726257,
0.29845836758613586,
0.6195472478866577,
0.46006765961647034,
0.05271323025226593,... |
api/client/url/index.md | API - Client - url - Value:
A string. | [
-2.0116066932678223,
-0.12754592299461365,
-1.0559641122817993,
-1.007751226425171,
-0.2644917964935303,
-0.1758774071931839,
1.1199902296066284,
0.5190306901931763,
0.052152082324028015,
-0.8736866116523743,
0.703369140625,
-0.22847218811511993,
-0.4506065547466278,
-0.2532309591770172,
... |
api/client/url/index.md | API - Client - url - Examples:
Example:
self.addEventListener("notificationclick", (event) => {
console.log("On notification click: ", event.notification.tag);
event.notification.close();
// This looks to see if the current is already open and
// focuses if it is
event.waitUntil(
clients
.matchAl... | [
-1.0982929468154907,
-0.6098788380622864,
-0.04226391017436981,
-0.05161137133836746,
0.13993461430072784,
-1.3833154439926147,
0.03372135013341904,
0.08703368902206421,
0.24400290846824646,
0.04662283509969711,
-0.24842524528503418,
0.5749345421791077,
-0.13956709206104279,
0.011672936379... |
api/cssmathinvert/index.md | API - CSSMathInvert:
The `CSSMathInvert` interface of the CSS Typed Object Model API represents a CSS `calc()` used as `calc(1 / <value>)`. It inherits properties and methods from its parent `CSSNumericValue`. | [
0.041517771780490875,
0.31952157616615295,
-0.47731342911720276,
0.37066468596458435,
0.29874566197395325,
-2.010098457336426,
-0.3965095579624176,
0.41017094254493713,
1.3055710792541504,
0.5016226768493652,
-0.3320327699184418,
0.18797871470451355,
0.7769835591316223,
-0.1096558570861816... |
api/cssmathinvert/index.md | API - CSSMathInvert - Constructor:
- `CSSMathInvert()`: Creates a new `CSSMathInvert` object. | [
-1.6278200149536133,
-0.05364929884672165,
-0.7876811027526855,
0.07659386843442917,
0.16778871417045593,
-1.777350902557373,
-0.1688135415315628,
0.7836112380027771,
-0.04663901776075363,
0.041079454123973846,
-0.23939214646816254,
-0.07876482605934143,
1.0353113412857056,
0.1436671912670... |
api/cssmathinvert/index.md | API - CSSMathInvert - Instance properties:
- `CSSMathInvert.value` (read only): Returns a `CSSNumericValue` object. | [
-0.6797520518302917,
0.7060031294822693,
-0.5110512971878052,
0.11413516104221344,
-0.19220954179763794,
-2.080026626586914,
0.37332475185394287,
0.41811227798461914,
0.2382906675338745,
0.08105456084012985,
-0.18103067576885223,
0.4929962754249573,
1.052795171737671,
-0.44350048899650574,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.