Lesson 6 Flashcards
Working with Fonts, Text Blocks, Lists and Tables (10 cards)
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.”
<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 would you represent the chemical formula for water?
H20
How would you display “[ ] 2018, Webwonks Inc.” on a web page? Write the code
Two options:
© 2018, Webwonks Inc.
© 2018, Webwonks Inc.
How would you center all the text on a page?
<body> [ Insert content ] </body>
How can you create a simple two-column, two-row table with a single-pixel black border outlining the table?
<table>
<tr>
<td> Top left </td>
<td> Top right </td>
</tr>
<tr>
<td> Bottom left </td>
<td> Bottom right </td>
</tr>
</table>
Why should you use character codes to write 3 < 6 on a web page?
so the browser won’t confuse the lesser than sign < with the start of an HTML tag
What typeface will be used in most browsers with this style property:
font-family: Geneva, Arial, helvetica, sans-serif;
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.
What is the CSS command to define a web font?
Use the @font-face rule to define the name and source URL of a web font
What do you call a list enclosed inside another list?
Nested list
What is the CSS property for creating a three-column newspaper layout on a web page?
column-count: 3;