HTML Styles & Programming Flashcards

1
Q

style

A

Element for CSS
goes in the head
Specifies how the page should render

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

div

A

Division of the page used as
a container for elements to be
styled by CSS or manipulated by
JavaScript

Any elements can go in the tag

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

span

A

An inline container to markup,
stylize with CSS, or manipulate
with JavaScript

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

header

A

Used for containing introductory
or navigation content

headings, logos, authorship

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

footer

A

Defines a container for footer information

authorship, copyright, contact info,
site map, related documents, back to top

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

main

A

The main content

Only one main

Must NOT descend from:
article, aside, footer, header, or nav

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

section

A

Defines a section of the page,
has a more specific meaning than div

Used for elements that are on a
consistent topic, same theme

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

article

A

Used to specify self-contained information

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

aside

A

Defines content aside from

the page content, side-bar content

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

details summary

A

Specifies a container with additional
details that collapse

details
summary /summary
p /p
/details

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

dialog

A

Defines a subwindow, for popup

dialogs and modals

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

data

A

Allows for machine readable translation of content

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

time

A

An element that translates time into
machine readable code that can
interact with the user’s calendar

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

script

A

Adds JavaScript to the page

OR can add an external JavaScript
file.

script src=””

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

noscript

A

An element to display if the browser

does not support JavaScript

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

iframe

A

defines an inline frame for embedding

another document

17
Q

progress

A

Creates a progress bar element

label for=”bar” …. /label
progress id=”bar” value=”x” max=”y” /progress

18
Q

What is a block level element?

A

An element that…
Always starts on a new row/line
with some margin from the browser
Always takes up the full width available

<div></div>

19
Q

What is an inline element?

A

An element that…
Does not start on a new line
And only takes up width as necessary

<span></span>

20
Q

Can an inline element contain a block element?

A

No, it cannot.

21
Q

class=””

A

The class attribute points to a stylesheet class name. It is case-sensitive and can point to multiple elements.

name=”cityscape”

.cityscape {}

22
Q

id=””

A

johnBio {}

The id attribute specifies a unique id for an element. (One element)

The id will point to a specific CSS declaration.

id=”johnBio”

23
Q

How do you define a character set for the page?

A

In the head…

meta charset=”UTF-8”

24
Q

How do you define keywords for a page, that a search engine will pick up?

A

In the head…
meta name=”keywords”
content=”pizza, etc”

25
Q

How do you define a description for a page?

A

In the head…
meta name=”description”
content=”LA’s Finest Pizza”

26
Q

How do you define an author for the page?

A

In the head…
meta name=”author”
content=”Pat Dough”

27
Q

How do you set a document to refresh every 30 seconds?

A

In the head…
meta http-equiv=”refresh”
content=”30”

28
Q

How would you set the page to look good on all devices?

A

In the head…
name=”viewport”
content=”width=device-width,
initial-scale=1.0”

29
Q

How would you set a script in the head?

A

script src=”app.js” type=”module” defer

30
Q

What happens when the script is async?

A

The script is downloaded in parallel to parsing the page.

BUT is executed before the page finishes parsing.

31
Q

What happens when the script is defer?

A

The script is downloaded in parallel to parsing the page

AND only executes after the page is parsed

32
Q

What happens when a script is neither defer or async?

A

The script blocks parsing the page
AND downloads and executes before parsing can resume.

if defer and async are absent, move script to the end of the body