Prelims - Text Flashcards

1
Q

The color property is used to set the color of the text. The color is specified by:

A

a color name - like “red”
a HEX value - like “#ff0000”
an RGB value - like “rgb(255,0,0)

body {
  color: blue;
}

h1 {
  color: green;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Specifies the color of text

A

color

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Specifies the background color of text

A

` background-color`

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

property is used to set the horizontal alignment of a text.

A

text-align

h1 {
  text-align: center;
}

h2 {
  text-align: left;
}

h3 {
  text-align: right;
}

h4 { 
text-align: justify
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

property specifies how to align the last line of a text.

A

text-align-last

p.a {
  text-align-last: right;
}

p.b {
  text-align-last: center;
}

p.c {
  text-align-last: justify;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

properties can be used to change the text direction of an element

A

direction and unicode-bidi

p {
  direction: rtl;
  unicode-bidi: bidi-override;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

property sets the vertical alignment of an element

A

vertical-align

img.a {
  vertical-align: baseline;
}

img.b {
  vertical-align: text-top;
}

img.c {
  vertical-align: text-bottom;
}

img.d {
  vertical-align: sub;
}

img.e {
  vertical-align: super;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Specifies the text direction/writing direction

A

direction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Used together with the direction property to set or return whether the text should be overridden to support multiple languages in the same document

A

unicode-bidi

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

property is used to add a decoration line to text

A

text-decoration-line

h1 {
  text-decoration-line: overline;
}

h2 {
  text-decoration-line: line-through;
}

h3 {
  text-decoration-line: underline;
}

p {
  text-decoration-line: overline underline;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

property is used to set the color of the decoration line

A

text-decoration-color

h1 {
  text-decoration-line: overline;
  text-decoration-color: red;
}

h2 {
  text-decoration-line: line-through;
  text-decoration-color: blue;
}

h3 {
  text-decoration-line: underline;
  text-decoration-color: green;
}

p {
  text-decoration-line: overline underline;
  text-decoration-color: purple;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

property is used to set the style of the decoration line

A

text-decoration-style

h1 {
  text-decoration-line: underline;
  text-decoration-style: solid;
}

h2 {
  text-decoration-line: underline;
  text-decoration-style: double;
}

h3 {
  text-decoration-line: underline;
  text-decoration-style: dotted;
}

p.ex1 {
  text-decoration-line: underline;
  text-decoration-style: dashed;
}

p.ex2 {
  text-decoration-line: underline;
  text-decoration-style: wavy;
}

p.ex3 {
  text-decoration-line: underline;
  text-decoration-color: red;
  text-decoration-style: wavy;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The text-decoration property is a shorthand property for

A

text-decoration-line (required)
text-decoration-color (optional)
text-decoration-style (optional)
text-decoration-thickness (optional)

h1 {
  text-decoration: underline;
}

h2 {
  text-decoration: underline red;
}

h3 {
  text-decoration: underline red double;
}

p {
  text-decoration: underline red double 5px;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

is used to remove the underline from links

A

text-decoration: none

a {
  text-decoration: none;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Specifies the thickness of the text decoration line

A

text-decoration-thickness

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

property is used to specify uppercase and lowercase letters in a text.

A

text-transform

p.uppercase {
  text-transform: uppercase;
}

p.lowercase {
  text-transform: lowercase;
}

p.capitalize {
  text-transform: capitalize;
}
17
Q

property is used to specify the indentation of the first line of a text

A

text-indent

p {
  text-indent: 50px;
}
18
Q

property is used to specify the space between the characters in a text.

A

letter-spacing

h1 {
  letter-spacing: 5px;
}

h2 {
  letter-spacing: -2px;
}
19
Q

property is used to specify the space between lines:

A

line-height

p.small {
  line-height: 0.8;
}

p.big {
  line-height: 1.8;
}
20
Q

property is used to specify the space between the words in a text.

A

word-spacing

p.one {
  word-spacing: 10px;
}

p.two {
  word-spacing: -2px;
}
21
Q

property specifies how white-space inside an element is handled.

A

white-space

p {
  white-space: nowrap;
}
22
Q

property adds shadow to text

A

text-shadow

h1 {
  text-shadow: 2px 2px;
}

In its simplest use, you only specify the horizontal shadow (2px) and the vertical shadow (2px)

23
Q
A