2 Text Flashcards

1
Q

Difference between structural markup and semantic markup

A

Structural- describes headings and paragraphs,etc. Things that effects the structure of the page

Semantic- Provides extra info. Where emphasis should be placed on words, quotations (and attributions), meaning of acronyms etc. Can be affected by CSS styles but otherwise don’t change things.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
What are the tags for:
bold
italic
superscipt
subscript

How do these tags differ from others?

do they have semantic meaning?

A

&ltb>
&lti> italic
&ltsup> superscipt
&ltsub> subscript

These are meant to actually change the way the text looks with HTML and not necessarily represent semantic info (or structural info)
Things like em or strong are for more semantic value for css control and are recommended nowadays

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

how do browers treat multiple spaces or new lines within &ltp> tags?

A

new lines- ignores

multiple spaces- ignores

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

Tag for new line

A

&ltbr>

or &ltbr />

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

Tag for horizontal line with a new line

A

&lthr>

or &lthr />

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

Tag to indicate that text has importance (semantic)

A

&ltstrong>

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

Tag to indicate emphasis to change the meaning of a sentence (semantic)

A
&ltem>
italics by default most of the time, capitalized here for example:
I THINK ivy was the first
I think IVY was the first
I think ivy was the FIRST
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

(semantic)
Tag for Quote.

Tag for whole paragraph of quotes

Defines the title of a creative work (e.g. a book, a poem, a song, a movie, a painting, a sculpture, etc.).
Note: A person’s name is not the title of a work.

How do you have the author source at the bottom of the quote?

A

&ltq>
Adds quotation marks by default.

&ltblockquote> (can be nested in p tags or contain p tags within)
Does not add quotation marks by default

cite

Use a figure, the blockquote is in place of the image, figcaption for the author source

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

(semantic)
Tag a word as an abbrevation.
Have the full thing display when hovered over

A

&ltabbr>

&ltabbr title=”full word”>

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

(semantic)
Reference a book, film, research paper etc.
(not for people names)

A

&ltcite>

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

(semantic)
Set a defining instance for a term.

Show definition when hovered

A

&ltdfn>

title attribute

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

(semantic)

Set author details like email address, URL, physical address, phone number, social media handle, etc.

A

&ltaddress>

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

(semantic)
Show that a word has been deleted as a correction

Show that a word has been added

Show that a word is no longer accurate or relevant (but not to be deleted)

(often crosses out and underlines as default)

A

&ltdel>

&ltins>

&lts> (called strike through)

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

(semantic)

Highlight text

A

&ltmark>

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

Elements that start on a new line

Elements that do not

A

Block

Inline

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

Semantics for a keyboard button

A

&ltkbd>Ctrl&lt/kbd>

17
Q

Use an online font library

2 ways, 1 html, 1 css

A

One popular and easy method to get fonts that are not installed on a user’s computer is to use an online font library like Google Fonts, Font Library or the premium, but non-free Adobe Fonts.

To use a font from one of these libraries, go to the website, select a font and then copy a snippet from the website to import that font from their server into your website.
You’ll be given either a tag to put in your HTML:

&ltlink rel=”preconnect” href=”https://fonts.googleapis.com”>
&ltlink rel=”preconnect” href=”https://fonts.gstatic.com” crossorigin>
&ltlink href=”https://fonts.googleapis.com/css2?family=Roboto&display=swap” rel=”stylesheet”>

Or a CSS thing:
@import url(‘https://fonts.googleapis.com/css2?family=Roboto&display=swap’);

then you can use font-family to define the font

18
Q

Have overflowing text do 3 ellipses like: …

A

It’s text-overflow: ellipsis
But you have to set the overflow to hidden first.
whitespace nowrap makes the text not wrap to the next line (it doesn’t seem to work without this).

.overflowing {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}