WD - balises (CSS) Flashcards

1
Q

What is CSS?

A

You can specify many style properties for any given HTML element. Each property has a name and a value, separeted by “:”. Each property declaration separated by “;”.

color:olive; font-size:24px;

Pour l’utiliser:

<p> HTML styles with CSS</p>

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

Inline styles

A

It is called inline because we declared the styles within the HTML tag itself.

Pour l’utiliser:

<p> HTML styles with CSS</p>

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

Embedded styles

A

Embedded styles are addead to the element of a document, and can contain most of the styles for the document.

My example

body { background-color: grey}
etc etc

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

External styles

A

External styles refers to creating a separate file that contains all style information. This file is then linked to from as many HTML Pages as you like -even the whole site.
You have tuse the “link” tag, providing the url of style sheet in the href attribute as well as rel”stylesheet”.

my example

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

Selectors

A

Embedded style sheets and external style sheets use selectors to specify which element to apply a style to.
Example “body” is a selector for the”” element.

#intro is an ID selector. id="intro"
.colorful is a class selector. class="colorful"
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

foreground color (la couleur du font, de la lettre)

A

color:orange;

<h1> HTML colors </h1>

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

coleur de la bordure (encadrement de ce que tu écris)

A

border-color:olivedrab;

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

La couleur pour le surlignement de ce que tu écris

A

background-color:yellow;

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

Comment nommer une couleur?

A
  • color name (ex: blue)
  • hexadecimal (ex: #0000ff)
  • RGB (ex: rgb(0,0,255))
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Pour la transparence?

A

il faut rajouter “a”.

ex: “background-color:rgba(0,0,255,0.5)” (ça deviendra semi-transparent)

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