Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/en-us/web/html/how_to/use_data_attributes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ threeColumnArticles.forEach((article) => {

## CSS access

Note that, as data attributes are plain HTML attributes, you can even access them from [CSS](/en-US/docs/Web/CSS). For example to show the parent data on the article you can use [generated content](/en-US/docs/Web/CSS/Reference/Properties/content) in CSS with the [`attr()`](/en-US/docs/Web/CSS/Reference/Values/attr) function:
Note that, as data attributes are plain HTML attributes, you can even access them from [CSS](/en-US/docs/Web/CSS). For example to show the parent data on the article you can use [generated content](/en-US/docs/Web/CSS/Reference/Properties/content) in CSS with the {{cssxref("attr()")}} function:

```css
article::before {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ Placeholders can not be relied upon as a replacement for a label even for those
## See also

- HTML [`title`](/en-US/docs/Web/HTML/Reference/Global_attributes/title)
- CSS [`:placeholder-shown`](/en-US/docs/Web/CSS/Reference/Selectors/:placeholder-shown) pseudo-class selector
- CSS [`::placeholder`](/en-US/docs/Web/CSS/Reference/Selectors/::placeholder) pseudo-element selector
- CSS {{cssxref(":placeholder-shown")}} pseudo-class selector
- CSS {{cssxref("::placeholder")}} pseudo-element selector
2 changes: 1 addition & 1 deletion files/en-us/web/html/reference/elements/col/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ The following attributes are deprecated and should not be used. They are documen
> If the table does use a [`colspan`](/en-US/docs/Web/HTML/Reference/Elements/td#colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.

- `bgcolor` {{deprecated_inline}}
- : Defines the background color of each column cell. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("color_value", "<color>")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.
- : Defines the background color of each column cell. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("<color>")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.

- `char` {{deprecated_inline}}
- : Does nothing. It was originally intended to specify the alignment of the content to a character of each column cell. Typical values for this include a period (`.`) when attempting to align numbers or monetary values. If [`align`](#align) is not set to `char`, this attribute is ignored, though it will still override the specified [`char`](/en-US/docs/Web/HTML/Reference/Elements/colgroup#char) of its {{HTMLElement("colgroup")}} parent element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ The following attributes are deprecated and should not be used. They are documen
> If the table does use a [`colspan`](/en-US/docs/Web/HTML/Reference/Elements/td#colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.

- `bgcolor` {{deprecated_inline}}
- : Defines the background color of each column group cell. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("color_value", "<color>")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.
- : Defines the background color of each column group cell. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("<color>")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.

- `char` {{deprecated_inline}}
- : Does nothing. It was originally intended to specify the alignment of the content to a character of each column group cell. Typical values for this include a period (`.`) when attempting to align numbers or monetary values. If [`align`](#align) is not set to `char`, this attribute is ignored, though it will still be used as the default value for the [`align`](/en-US/docs/Web/HTML/Reference/Elements/col#align) of the {{HTMLElement("col")}} elements which are members of this column group.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/reference/elements/dialog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ The HTML contains a `<dialog>` element, plus a button to show the dialog. Additi

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 `dialog` state to transition back to once the `<dialog>` has appeared. Note how the `<dialog>`'s `transition` list includes not only these properties, but also the `display` and `overlay` properties, each with `allow-discrete` set on them.

We also set a starting style value for the {{cssxref("background-color")}} property on the [`::backdrop`](/en-US/docs/Web/CSS/Reference/Selectors/::backdrop) that appears behind the `<dialog>` when it opens, to provide a nice darkening animation. The `dialog:open::backdrop` selector selects only the backdrops of `<dialog>` elements when the dialog is open.
We also set a starting style value for the {{cssxref("background-color")}} property on the {{cssxref("::backdrop")}} that appears behind the `<dialog>` when it opens, to provide a nice darkening animation. The `dialog:open::backdrop` selector selects only the backdrops of `<dialog>` elements when the dialog is open.

```css
/* Open state of the dialog */
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/reference/elements/img/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ This element includes the [global attributes](/en-US/docs/Web/HTML/Reference/Glo
1. A [media condition](/en-US/docs/Web/CSS/Guides/Media_queries/Using#syntax), omitted for the last item in the list.
2. A source size value.

Media conditions describe properties of the _viewport_, not the _image_. For example, `(height <= 500px) 1000px` proposes using an image source of 1000px width if the _viewport_ height is 500px or less. Because a source size descriptor specifies the width to use for the image during layout, the media condition is typically (but not necessarily) based on the [width](/en-US/docs/Web/CSS/Reference/At-rules/@media/width).
Media conditions describe properties of the _viewport_, not the _image_. For example, `(height <= 500px) 1000px` proposes using an image source of 1000px width if the _viewport_ height is 500px or less. Because a source size descriptor specifies the width to use for the image during layout, the media condition is typically (but not necessarily) based on the {{cssxref("@media/width")}}.

Source size values specify the intended display size of the image. {{glossary("User agent", "User agents")}} use the current source size to select one of the sources supplied by the `srcset` attribute, when those sources are described using width (`w`) descriptors. The selected source size affects the {{glossary("intrinsic size")}} of the image (the image's display size if no {{glossary("CSS")}} styling is applied).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ In addition to the [global attribute](/en-US/docs/Web/HTML/Reference/Global_attr

- `colorspace` {{experimental_inline}}
- : Defines the {{glossary("color space")}} for the color and hints at the desired user interface for the color picker widget. Possible {{Glossary("enumerated")}} values are:
- `"limited-srgb"`: The color is in the {{glossary("RGB", "sRGB")}} color space. This includes [`rgb()`](/en-US/docs/Web/CSS/Reference/Values/color_value/rgb), [`hsl()`](/en-US/docs/Web/CSS/Reference/Values/color_value/hsl), [`hwb()`](/en-US/docs/Web/CSS/Reference/Values/color_value/hwb), and {{cssxref("hex-color")}} values. The color value is limited to 8-bits per `r`, `g`, and `b` component. This is the default.
- `"limited-srgb"`: The color is in the {{glossary("RGB", "sRGB")}} color space. This includes {{cssxref("color_value/rgb", "rgb()")}}, {{cssxref("color_value/hsl", "hsl()")}}, {{cssxref("color_value/hwb", "hwb()")}}, and {{cssxref("hex-color")}} values. The color value is limited to 8-bits per `r`, `g`, and `b` component. This is the default.
- `"display-p3"`: The [Display P3 color space](/en-US/docs/Glossary/Color_space#display-p3), e.g., `color(display-p3 1.84 -0.19 0.72 / 0.6)`

## Using color inputs
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/reference/elements/input/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ A few additional non-standard attributes are listed following the descriptions o

- `colorspace` {{experimental_inline}}
- : Valid for the `color` input type only, the `colorspace` attribute specifies the [color space](/en-US/docs/Glossary/Color_space) that is used by the `type="color"` input. Possible {{Glossary("enumerated")}} values are:
- `"limited-srgb"`: The color is in the {{glossary("RGB", "sRGB")}} color space. This includes [`rgb()`](/en-US/docs/Web/CSS/Reference/Values/color_value/rgb), [`hsl()`](/en-US/docs/Web/CSS/Reference/Values/color_value/hsl), [`hwb()`](/en-US/docs/Web/CSS/Reference/Values/color_value/hwb), and {{cssxref("hex-color")}} values. The color value is limited to 8-bits per `r`, `g`, and `b` component. This is the default.
- `"limited-srgb"`: The color is in the {{glossary("RGB", "sRGB")}} color space. This includes {{cssxref("color_value/rgb", "rgb()")}}, {{cssxref("color_value/hsl", "hsl()")}}, {{cssxref("color_value/hwb", "hwb()")}}, and {{cssxref("hex-color")}} values. The color value is limited to 8-bits per `r`, `g`, and `b` component. This is the default.
- `"display-p3"`: The [Display P3 color space](/en-US/docs/Glossary/Color_space#display-p3), e.g., `color(display-p3 1.84 -0.19 0.72 / 0.6)`

- [`dirname`](/en-US/docs/Web/HTML/Reference/Attributes/dirname)
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/reference/elements/marquee/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sidebar: htmlsidebar

The **`<marquee>`** [HTML](/en-US/docs/Web/HTML) element is used to insert a scrolling area of text. You can control what happens when the text reaches the edges of its content area using its attributes.

The HTML `<marquee>` element is deprecated and its use is strongly discouraged. If you must create the effect of scrolling text or continuous elements, consider using [CSS animations](/en-US/docs/Web/CSS/Guides/Animations) with [CSS transforms](/en-US/docs/Web/CSS/Guides/Transforms/Using) instead of `<marquee>` elements to smoothly animate content. Additionally, include the [`prefers-reduced-motion`](/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-motion) CSS {{cssxref("@media")}} query to stop the animation based on user preference, thereby improving user experience and accessibility.
The HTML `<marquee>` element is deprecated and its use is strongly discouraged. If you must create the effect of scrolling text or continuous elements, consider using [CSS animations](/en-US/docs/Web/CSS/Guides/Animations) with [CSS transforms](/en-US/docs/Web/CSS/Guides/Transforms/Using) instead of `<marquee>` elements to smoothly animate content. Additionally, include the {{cssxref("@media/prefers-reduced-motion")}} CSS {{cssxref("@media")}} query to stop the animation based on user preference, thereby improving user experience and accessibility.

## Attributes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ Whether the light or dark color scheme is used depends on user preferences such
## See also

- {{cssxref("color-scheme")}} CSS property
- [`prefers-color-scheme`](/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme) media query
- {{cssxref("@media/prefers-color-scheme")}} media query
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ For example:

- `<meta>` `name` attribute [`color-scheme`](/en-US/docs/Web/HTML/Reference/Elements/meta/name/color-scheme) value
- {{cssxref("color-scheme")}} CSS property
- [`prefers-color-scheme`](/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme) media query
- {{cssxref("@media/prefers-color-scheme")}} media query
4 changes: 2 additions & 2 deletions files/en-us/web/html/reference/elements/picture/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ If the {{HTMLElement("source")}}'s media condition evaluates to `false`, the bro
</picture>
```

You can swap image assets for light and dark themes using the [`prefers-color-scheme`](/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme) media feature:
You can swap image assets for light and dark themes using the {{cssxref("@media/prefers-color-scheme")}} media feature:

```html
<picture>
Expand Down Expand Up @@ -221,4 +221,4 @@ The `type` attribute specifies a [MIME type](/en-US/docs/Web/HTTP/Guides/MIME_ty
- {{HTMLElement("source")}} element
- Positioning and sizing the picture within its frame: {{cssxref("object-position")}} and {{cssxref("object-fit")}}
- [Image file type and format guide](/en-US/docs/Web/Media/Guides/Formats/Image_types)
- [CSS `prefers-color-scheme` media feature](/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-color-scheme)
- {{cssxref("@media/prefers-color-scheme")}} media feature
2 changes: 1 addition & 1 deletion files/en-us/web/html/reference/elements/table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ The following attributes are deprecated and should not be used. They are documen
- : Specifies the horizontal alignment of the table within its parent element. The possible {{Glossary("enumerated")}} values are `left`, `center`, and `right`. Use the {{cssxref("margin-inline-start")}} and {{cssxref("margin-inline-end")}} CSS properties instead, as this attribute is deprecated.

- `bgcolor` {{deprecated_inline}}
- : Defines the background color of the table. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("color_value", "&lt;color&gt;")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.
- : Defines the background color of the table. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("&lt;color&gt;")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.

- `border` {{deprecated_inline}}
- : Defines, as a non-negative integer value (in pixels), the size of the frame surrounding the table. If set to `0`, the [`frame`](#frame) attribute is set to void. Use the {{cssxref("border")}} CSS property instead, as this attribute is deprecated.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/reference/elements/tbody/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The following attributes are deprecated and should not be used. They are documen
- : Specifies the horizontal alignment of each body cell. The possible {{Glossary("enumerated")}} values are `left`, `center`, `right`, `justify`, and `char`. When supported, the `char` value aligns the textual content on the character defined in the [`char`](#char) attribute and on offset defined by the [`charoff`](#charoff) attribute. Use the {{cssxref("text-align")}} CSS property instead, as this attribute is deprecated.

- `bgcolor` {{deprecated_inline}}
- : Defines the background color of each body cell. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("color_value", "&lt;color&gt;")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.
- : Defines the background color of each body cell. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("&lt;color&gt;")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.

- `char` {{deprecated_inline}}
- : Specifies the alignment of the content to a character of each body cell. Typical values for this include a period (`.`) when attempting to align numbers or monetary values. If [`align`](#align) is not set to `char`, this attribute is ignored.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/reference/elements/td/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The following attributes are deprecated and should not be used. They are documen
- : Contains a list of space-separated strings, each corresponding to the `id` attribute of a group of cells that the data cell applies to.

- `bgcolor` {{deprecated_inline}}
- : Defines the background color of the data cell. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("color_value", "&lt;color&gt;")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.
- : Defines the background color of the data cell. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("&lt;color&gt;")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.

- `char` {{deprecated_inline}}
- : Does nothing. It was originally intended to specify the alignment of the content to a character of the data cell. Typical values for this include a period (`.`) when attempting to align numbers or monetary values. If [`align`](#align) is not set to `char`, this attribute is ignored.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ This example demonstrates how `shadowrootdelegatesfocus` is applied to a shadow

The code first declares a shadow root inside a `<div>` element, using the `<template>` element with the `shadowrootmode` attribute.
This displays both a non-focusable `<div>` containing text and a focusable `<input>` element.
It also uses CSS to style elements with [`:focus`](/en-US/docs/Web/CSS/Reference/Selectors/:focus) to blue, and to set the normal styling of the host element.
It also uses CSS to style elements with {{cssxref(":focus")}} to blue, and to set the normal styling of the host element.

```html
<div>
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/reference/elements/tfoot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The following attributes are deprecated and should not be used. They are documen
- : Specifies the horizontal alignment of each foot cell. The possible {{Glossary("enumerated")}} values are `left`, `center`, `right`, `justify`, and `char`. When supported, the `char` value aligns the textual content on the character defined in the [`char`](#char) attribute and on offset defined by the [`charoff`](#charoff) attribute. Use the {{cssxref("text-align")}} CSS property instead, as this attribute is deprecated.

- `bgcolor` {{deprecated_inline}}
- : Defines the background color of each foot cell. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("color_value", "&lt;color&gt;")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.
- : Defines the background color of each foot cell. The value is an HTML color; either a [6-digit hexadecimal RGB code](/en-US/docs/Web/CSS/Reference/Values/hex-color), prefixed by a `#`, or a [color keyword](/en-US/docs/Web/CSS/Reference/Values/named-color). Other CSS {{cssxref("&lt;color&gt;")}} values are not supported. Use the {{cssxref("background-color")}} CSS property instead, as this attribute is deprecated.

- `char` {{deprecated_inline}}
- : Does nothing. It was originally intended to specify the alignment of the content to a character of each foot cell. Typical values for this include a period (`.`) when attempting to align numbers or monetary values. If [`align`](#align) is not set to `char`, this attribute is ignored.
Expand Down
Loading