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>

A

sidebar

25
Q

<article> </article
</article>

A

textual article

26
Q

<footer> </footer>

A

footer (bottom of the page)

27
Q

sectioning elements: selecting by element name

A

selects all elements of same type

html:

<p> </p>

css:
p {
//declarations
}
*styles all <p> elements

28
Q

sectioning elements: selecting by relationship (direct descendant)

A

selecting element by selecting their parent element

syntax: parent > child { }

29
Q

<section>
<p>text text text</p>
</section>

what would the css look like if you selected via relationship?

A

section > child {
//declarations
}

*works bc child is direct descendant of parent

30
Q

selecting elements: selecting by relationship (not direct descendant)

A

selecting element by their “grandparent”

syntax: grandparent child { }

31
Q

<section>
<article>
<p>text text text</p>
</article>
</section>

what would the css look like if you selected via not direct relationship?

A

section p {
//declarations
}

32
Q

selecting elements: selecting by relationship (sibling)

A

selecting element by selecting their next sibling element

syntax: sibling + next sibling

33
Q

<section>
<p>text text text</p>
<p>text text text</p>
</section>

what would the css look like if you selected via sibling?

A

p + p {
}

34
Q

selecting elements: selecting by id

A

hi { }

id –> special attribute used to name single instance of element

ex) <p id="hi"></p>

35
Q

selecting by id syntax

A

id-name {}

36
Q

selecting elements: selecting by class

A

class –> special naming attribute, can be assigned to multiple elements

ex) <p class="hey"></p>
<p class="hey"></p>

.hey {}

37
Q

can you combine ids and classes?

A

id-name.class-name {}

yes, elements can have an id and class, and can be combined in css

38
Q

what is the order of priority styling methods?

A

inline code in html file
id selectors
class selectors, attribute selectors, psuedo-class selectors
normal element tag name
* –> selects all elements

39
Q

<div> </div>

A

block level container –> groups together large area of elements

block element –> entire width of parent container, starts on new line

40
Q

<span></span>

A

inline level container –> groups smaller sections of elements, no new line & only takes up as much width as content inside