HTML Basics Flashcards

1
Q

anatomy of website

A

content in .html file
html tags for structure
CSS code for styling in .css file
JavaScript for behavior and interactivity
browser to display website

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

what does html stand for

A

HyperText Markup Language

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

<h1> heading </h1>

what is <h1> here

A

element name and open tag (no attributes)

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

<h1> heading </h1>

what is </h1> here

A

closing tag

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

how to comment

A

<!-- comment -->

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

<h1>top level header</h1>

<h2>header level 2</h2>

<h3>header level 3</h3>

<h4>header level 4</h4>

<h5>header level 5</h5>

<h6>header level 6</h6>

what kind of elements are these

A

<header></header>

elements

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

<p> text</p>

what kind of element is this

A

paragraph

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

what is an absolute url

A

linking to an external website/location

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

what does an absolute url usually start with

A

http:// or https://

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

when do we use linking to an absolute url

A

external websites

CDNs (content delivery networks): stylesheets, fonts, etc

media hosted outside of your project’s file

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

what is a relative url

A

linking to something within your project directory

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

what does this mean with a relative url:

/ :

A

go up to the root directory (top level) & start looking there

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

what does this mean with a relative url:

../ :

A

go up one level & start there (../../ etc.)

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

if the path for img is:

<img></img>

where is pic.jpg located

A

located in the same folder as the current document

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

if the path for img is:

<img></img>

where is pic.jpg located

A

located in the folder one up from the current document

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

if the path for img is:

<img></img>

where is pic.jpg located

A

located in the img folder at the root level

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

if the path for img is:

<img></img>

where is pic.jpg located

A

located in the img folder thats in the same folder as the current document

18
Q

<h1></h1>

A

top level header

19
Q

<h2></h2>

A

header level 2

20
Q

<header> </header>

A

header element

21
Q

<nav> </nav>

A

nav bar element

22
Q

<main> </main>

A

main content of the page

23
Q

<section> </section>

A

group of related content split into a section

24
Q

<aside> </aside>

25
textual article
26
footer (bottom of the page)
27
sectioning elements: selecting by element name
selects all elements of same type html:

css: p { //declarations } *styles all

elements

28
sectioning elements: selecting by relationship (direct descendant)
selecting element by selecting their parent element syntax: parent > child { }
29

text text text

what would the css look like if you selected via relationship?
section > child { //declarations } *works bc child is direct descendant of parent
30
selecting elements: selecting by relationship (not direct descendant)
selecting element by their "grandparent" syntax: grandparent child { }
31

text text text

what would the css look like if you selected via not direct relationship?
section p { //declarations }
32
selecting elements: selecting by relationship (sibling)
selecting element by selecting their next sibling element syntax: sibling + next sibling
33

text text text

text text text

what would the css look like if you selected via sibling?
p + p { }
34
selecting elements: selecting by id
id --> special attribute used to name single instance of element ex)

#hi { }
35
selecting by id syntax
#id-name {}
36
selecting elements: selecting by class
class --> special naming attribute, can be assigned to multiple elements ex)

.hey {}
37
can you combine ids and classes?
yes, elements can have an id and class, and can be combined in css #id-name.class-name {}
38
what is the order of priority styling methods?
inline code in html file id selectors class selectors, attribute selectors, psuedo-class selectors normal element tag name * --> selects all elements
39
block level container --> groups together large area of elements block element --> entire width of parent container, starts on new line
40
inline level container --> groups smaller sections of elements, no new line & only takes up as much width as content inside