HTML & CSS- part 1 Flashcards

1
Q

What is the syntax of an HTML element?

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

What is a tag’s relationship to an element?

A

A tag is a part of an element.

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

How do you note an html page?

A

Text enclosed by these (but without spaces):
< ! - -
- - >
isn’t readable by the browser. It’s just for human readers.

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

What’s the file name extension for an html document?

A

.html

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

What’s the file name extension for a CSS document?

A

.css

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

Which kind of HTML page might not have its file name visible in the browser address bar?

A

index

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

What goes before “www” in a web address?

A

http://

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

How many HEADING sizes are there? Which is the largest?

A

*Six heading sizes.

*The largest is <h1>

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

What’s the second tag for <br>?

A

There isn’t one.

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

Is there a space between <br> and the text it affects?

A

No.

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

Where does the browser break the line in a <p>?

A

*Wherever it wants

*If you want the browser to break the heading a certain way, you have to tell it to do so explicitly, using the tag < br >

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

What’s the difference in row-skipping:
<p> < br >?

A

<p> breaks the line and skips a row

<br> just breaks a line. Does not skip a row.

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

Are CSS files and HTML files stored in the same folder?

A

You could put the CSS file in the same folder as your HTML file if you wanted to, but most developers don’t.

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

What’s the code to specify which font you want for a paragraph?

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

In a font stack, why do you write Georgia without quotes but “Times New Roman” with quotes?

A

Because “Times New Roman” has a space. If a font name has a space, you must put quotes around it?

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

What is always the last item in a font stack (besides the curly brace)?

A

The generic font descriptor, like serif or sans serif

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

In a font stack, why do you list more than one font?

A

*Fallback fonts are necessary because the browser grabs the fonts for the webpage from the user’s computer.

*With a font stack, the browser will move to your 2nd choice if the first isn’t available.

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

How many fallback fonts should you list?

A

You can list as many as you want, but usually it’s three or four.

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

What’s the first line of a code to style a paragraph? The last line?

A

First line is (note the space): p {
Last line is: }

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

How do you code a font stack?

A

font-family: font name, font name, serif/sans serif/monospace;

Note:
*you indent “font-family” two spaces

*use a colon after “font-family”

*commas between font names

*semicolon at the end, after the generic one

21
Q

What is a Web-safe font?

A

Web safe fonts are fonts that have a high likelihood of being found on the user’s computer

22
Q

How do you select the font for an h1 or an h2 compared to a paragraph?

A

It works the same way– just swap the first p for an h1 or h2:
p {
h1 {

23
Q

What does this mean?
font-size: 2em;

A

*codes the font to be twice as big as the default font

*if using in a heading, it’s twice as big as the default paragraph text, not the heading text.

24
Q

Besides “em”, what are other measurements for coding font size?

A

*percentages
*pixels
*points

25
Q

How do you create a class called “topics” for a paragraph?

A

p.topics {
/style info here/
}

26
Q

How do you use a class called “topics” in a paragraph tag?

A

<p class=”topics”>ipsum</p>

27
Q

How do create a class for headings called “subjects”?

A

h1.subjects {
/style info here/
}

28
Q

What is a class in CSS?

A

*A class is a group of style characteristics that you can apply as a unit to a paragraph, heading, etc.

*technically, it’s an ATTRIBUTE. The name of the specific class is the VALUE of that ATTRIBUTE

29
Q

When talking about fonts in CSS, what is EM?

A

It’s a unit of measurement. (As an HTML tag, it means “emphasis”, i.e. italics)

30
Q

A text that is 2em is twice the size as the default font size for that browser unless…

A

…a CSS style sheet is already in use on the site. Then it’s twice the size of the style sheet’s text size.

31
Q

How do you create a class that can be used for heading, paragraphs, or anything else that can use a class?

A

.classname {
}

In other words, you leave out the P or H2, etc in front of the period.

32
Q

What is the numerical range of font weights?

A

*100 through 900
*goes by hundreds: 100, 200, 300 and so on.
*100 is the lightest weight.
*400 is normal.
*900 is as heavy as it gets.

33
Q

What is the verbal range of font weights?

A

lighter
normal
bold
bolder

34
Q

Which two tags italicize the text?

A

<i> and <em>

35
Q

Which two tags make the text bold?

A

<b> and <strong>

36
Q

Which font characteristic would you use with <i>, <em>, <b>, and <strong>?

A

font-style

37
Q

Which font characteristics can you use to affect boldness?

A

font-weight
font-style (if using <b> or <strong>)

38
Q

What does <span> do?

A

*It lets you markup part of a text (as opposed to a whole block, like <div>). This mean it is “inline”

*You can use it with classes.

*<span class=”animal_names”> bison</span>

39
Q

Explain <span class> in simple language.

A

It let’s you add customized styling to a part of a heading, paragraph, etc.

40
Q

What is hex for white?

A

#FFFFFF

41
Q

What is hex for red?

A

#FF0000

42
Q

What is hex for blue?

A

#0000FF

43
Q

What is hex for black?

A

#000000

44
Q

What is hex for yellow?

A

#FFFF00

45
Q

What is hex for orange?

A

#FFA500

46
Q

What is hex for green?

A

#00FF00

47
Q

Which letters can be used in hex?

A

a-f

48
Q

What’s the code to assign a specific color?

A

.color_chooser {
color: (hex # or color name);
}

49
Q

Word-spacing isn’t used very often. What is its main use?

A

To slightly open up the space between bolded words, for better readability.