Text and Fonts Flashcards

1
Q

You are given legacy code that contains all page headings in span elements. Your client wants you to make these headings bold. How would you achieve this while minimizing your work?

A

This is done by using CSS. The following CSS markup would make all <span> contents bold:
span{font-weight: bold;}</span>

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

Without changing the HTML code of a web page, how would you make all the headers in h1 to show as italic?

A

h1 {font-style: italic;}

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

You are provided an academic essay and asked to make an HTML web page to hold the contents in an exact manner. You complete this, but do not include underlined headings to avoid confusion with hyperlinks. Nevertheless, your client insists that you use underlined headings. How would you add an underline to all the headings without re- coding the HTML for the web page?

A

Assuming that the headings are contained within h1 elements, this would be achieved via the following CSS: h1 {text-decoration: underline;}

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

An English classroom web page needs to show correct and wrong sentences. Your client wishes that the wrong sentences could be crossed-out. How could you achieve this via CSS?

A

The sentences could be wrapped in span tags, and the following CSS would add a strike- through: span{text-decoration: line-through;}

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

On a web page with a greenish color scheme, you wish to color all headers green. What are the syntax options for the CSS markup for coloring fonts green?

A

h1{color: #00FF00;}
h1{color: green;}
h1{color: rgb(0,255,0);}

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

If you do not specify the font size of paragraph elements, i.e. ‹p›, what would the default font size be set to?

A

16px

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

A web page contains definitions of font size. However, the measurement units are not consistent, as some elements’ fonts are in em, while others’ are in px. What is the difference between these two measurement scales?

A

em size depends on the visibility settings of the user’s computer, while px settings are going to be consistent.

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

You have a huge amount of text within an HTML page. This text includes headers in ‹h1› tags. Your client wishes you to make all headers as uppercase, even though they were typed into the web page in title case. How would you achieve this using CSS?

A

h1{text-transform:uppercase;}

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

On a legacy website, you are contracted to convert all text within ‹code› tags to
lower-case, and all page headers, including second-level sub-headings to uppercase. Give the skeleton code for how this could be done.

A

code{text-transform: lowercase;}

h1,h2{text-transform: uppercase;}

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

Give a skeleton code for how you would indent the first line of a paragraph text on a web page so that it looks more like how a natural paragraph would be in a text book.

A

p{text-indent: 20px;}

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