From 0d96a30c731f3b93028eff6f77f6fa5e0538045a Mon Sep 17 00:00:00 2001
From: estelle This text has a line underneath it. This text has a line over it. This text has a line going through it.
- This link will not be underlined, as links
- generally are by default. Be careful when removing the text decoration on
- anchors since users often depend on the underline to denote hyperlinks.
- This text has lines above and below it.
- This text has a really thick purple underline in supporting browsers.
+```html hidden
+
+ text-decoration: initial; (applied to a
+ Pretty link)
- This text might blink for you, depending on the browser you use.
+
+ text-underline-offset: -5px; (applied to a
+ Pretty link)
+
+ text-underline-position: under; (applied to a
+ Pretty link)
+
+ text-decoration: none; (applied to a
+ Pretty link)
+ text-decoration: underline red; text-decoration: wavy overline lime; text-decoration: line-through; text-decoration: dashed underline overline; text-decoration: solid underline purple 4px; text-shadow: red 4px 4px 0; text-emphasis: triangle red;
- text-decoration: initial; (applied to a - Pretty link) -
+```html +This text has a line underneath it.
+This text has a line over it.
+This text has a line going through it.
- text-underline-offset: -5px; (applied to a - Pretty link) -
- text-underline-position: under; (applied to a - Pretty link) -
- text-decoration: none; (applied to a - Pretty link) -
-text-decoration: underline red;
-text-decoration: wavy overline lime;
-text-decoration: line-through;
-text-decoration: dashed underline overline;
-text-decoration: solid underline purple 4px;
-text-shadow: red 4px 4px 0;
-text-emphasis: triangle red;
- + This link will not be underlined, as links + generally are by default. Be careful when removing the text decoration on + anchors since users often depend on the underline to denote hyperlinks. + +This text has lines above and below it.
++ This text has a really thick purple underline in supporting browsers. +
++ This text might blink for you, depending on the browser you use.
``` -{{EmbedLiveSample('Text decoration in action','auto','320')}} - -## Reference - -### Properties - -- {{cssxref("text-decoration")}} -- {{cssxref("text-decoration-color")}} -- {{cssxref("text-decoration-line")}} -- {{cssxref("text-decoration-skip")}} -- {{cssxref("text-decoration-skip-ink")}} -- {{cssxref("text-decoration-style")}} -- {{cssxref("text-decoration-thickness")}} -- {{cssxref("text-emphasis")}} -- {{cssxref("text-emphasis-color")}} -- {{cssxref("text-emphasis-position")}} -- {{cssxref("text-emphasis-style")}} -- {{cssxref("text-shadow")}} -- {{cssxref("text-underline-offset")}} -- {{cssxref("text-underline-position")}} - -The specification also defines the `text-decoration-skip-box`, `text-decoration-skip-self`, `text-decoration-skip-spaces`, `text-decoration-trim`, and `text-emphasis-skip` properties, which are not yet supported by any browser. - -### Values - -spelling-error -grammar-error - -## Guides - -## Related concepts - -- {{shadow}} -- line-stype - inline box - inline formatting context - letter spacing - word spacing - ruby annotation - ruby base - ruby container - first-letter - first-line - box fragment - box-decoration-break - ont-size - font-variant-position - ruby +{{EmbedLiveSample('Examples','auto','320')}} ## Specifications @@ -150,7 +90,6 @@ grammar-error ## See also - [CSS fonts](/en-US/docs/Web/CSS/CSS_fonts) module -- [CSS inline](/en-US/docs/Web/CSS/CSS_inline) module - [CSS ruby layout](/en-US/docs/Web/CSS/CSS_ruby_layout) module - [CSS text](/en-US/docs/Web/CSS/CSS_text) module - [CSS writing modes](/en-US/docs/Web/CSS/CSS_writing_modes) module From 74f0eb20467eb37194a9f1ba8933b960fc09551a Mon Sep 17 00:00:00 2001 From: Estelle Weyl