Web Layout Flashcards

1
Q

When to use ?

A

The main element is used to wrap (you guessed it) the main content, and there should be only one per page. It’s meant to surround the information related to your page’s central topic. It’s not meant to include items that repeat across pages, like navigation links or banners.

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

Main tag’s embedded assistive technology feature…

A

The main tag has an embedded feature assistive technology can use to navigate to the main content quickly.

If you’ve ever seen a “Jump to Main Content” link at the top of a page, using the main tag automatically gives assistive devices that functionality.

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

article

A

article is a sectioning element and is used to wrap independent, self-contained content. The tag works well with blog entries, forum posts, or news articles.

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

Can this content stand alone as an article?

A

A judgment call, but ask yourself if you removed all surrounding context, would that content still make sense?

Similarly, for text, would the content hold up if it were in an RSS feed?

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

section

A

a section is for grouping thematically related content.

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

can use sections inside articles

A

They can be used within each other, as needed. For example, if a book is the article, then each chapter is a section. When there’s no relationship between groups of content, then use a div.

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

nav

A

This tag is meant to wrap around the main navigation links in your page. Element has embedded landmark feature for easy screen reader navigation.

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

what if you want a nav menu at bottom of page?

A

If there are repeated site links at the bottom of the page, it isn’t necessary to markup those with a nav tag as well. Using a footer (covered in the next challenge) is sufficient.

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

footer

A

It’s primarily used to contain copyright information or links to related documents that usually sit at the bottom of a page. Similar to header and nav, the footer element has a built-in landmark feature that allows assistive devices to quickly navigate to it.

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

&copy

A

how to write the copyright symbol

i.e. © 2018 Camper Cat

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

audio

A

The audio tag supports the controls attribute.

This shows the browser default play, pause, and other controls, and supports keyboard functionality. This is a boolean attribute, meaning it doesn’t need a value, its presence on the tag turns the setting on.

Here’s an example:

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

does audio content need alt text?

A

HTML5’s audio element gives semantic meaning when it wraps sound or audio stream content in your markup. Audio content also needs a text alternative to be accessible to people who are deaf or hard of hearing. This can be done with nearby text on the page or a link to a transcript.

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

figure

and

figcaption

A

Used together, these items wrap a visual representation (like an image, diagram, or chart) along with its caption. Wrapping these elements together gives a two-fold accessibility boost by semantically grouping related content and providing a text alternative explaining the figure.

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

label

A

The label tag wraps the text for a specific form control item, usually the name or label for a choice. It ties meaning to the item to make it more readable.

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

for

A

for attribute on a label tag explicitly associates that label with the form control and is used by screen readers.
The value of the for attribute must be the same as the value of the id attribute of the form control. Here’s an example:

Name:

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

viewport units

A

Instead of using em or px to size text, you can use viewport units for responsive typography. Viewport units, like percentages, are relative units, but they are based off different items. Viewport units are relative to the viewport dimensions (width or height) of a device, and percentages are relative to the size of the parent container element.

17
Q

The four different viewport units

A

vw (viewport width): 10vw would be 10% of the viewport’s width.
vh (viewport height): 3vh would be 3% of the viewport’s height.
vmin (viewport minimum): 70vmin would be 70% of the viewport’s smaller dimension (height or width).
vmax (viewport maximum): 100vmax would be 100% of the viewport’s bigger dimension (height or width).