Lesson 6 Flashcards

Working with Fonts, Text Blocks, Lists and Tables (10 cards)

1
Q

How would you write this sentence with the first four words bold, using styles rather than the <b> or <strong> tags?</strong></b>

“$40 Lip gloss from Dior allegedly has been discoloring black women’s lips, according to users on TikTok.”

A

<p> <span> Dior's $40 Lip gloss </span> has been discoloring black women's lips, according to users on TikTok. </p>

The <span> tag in HTML is an inline container used to apply styles or manipulate parts of text without affecting layout. It’s often used inside other elements like <p>, <div>, or even <a> when you want to target just a specific portion of content for styling or scripting.</a></span>

Unlike <div>, which is block-level, <span> is inline, it won’t start a new line or alter the structure.</span>

Practical uses:

  • Bold, color, or italicize a word or phrase
  • Apply JavaScript to just part of a sentence
  • Highlight search results dynamically

Let me know if you want help styling multiple <span>’s or applying classes instead of inline styles.</span>

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

How would you represent the chemical formula for water?

A

H20

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

How would you display “[ ] 2018, Webwonks Inc.” on a web page? Write the code

A

Two options:

© 2018, Webwonks Inc.

© 2018, Webwonks Inc.

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

How would you center all the text on a page?

A

<body> [ Insert content ] </body>

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

How can you create a simple two-column, two-row table with a single-pixel black border outlining the table?

A

<table>
<tr>
<td> Top left </td>
<td> Top right </td>
</tr>

<tr>
<td> Bottom left </td>
<td> Bottom right </td>
</tr>
</table>

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

Why should you use character codes to write 3 < 6 on a web page?

A

so the browser won’t confuse the lesser than sign < with the start of an HTML tag

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

What typeface will be used in most browsers with this style property:

font-family: Geneva, Arial, helvetica, sans-serif;

A

The browser will first display Geneva. If it doesn’t have that font, then it will display Arial, then Helvetica, and then in its default sans-serif font.

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

What is the CSS command to define a web font?

A

Use the @font-face rule to define the name and source URL of a web font

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

What do you call a list enclosed inside another list?

A

Nested list

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

What is the CSS property for creating a three-column newspaper layout on a web page?

A

column-count: 3;

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