Lesson #1 - Basic HTML5 Flashcards

1
Q

How are the header elements for HTML written?

A

< h > h >

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

How many header elements are there? What are the differences between each header element?

A

6

The text size

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

How are the paragraph elements for HTML written?

A

< p > < /p >

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

How are comments within HTML written?

A

< !– Comment here –>

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

True or False: Comments are useful for making specific code inactive without having to delete it entirely.

A

True

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

What does the “main” HTML5 tag do?

A

It helps search engines and other developers find the main content of your page.

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

What is a simple way to differentiate between HTML tags and elements?

A

Tags are like the parents and elements are like the children

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

What element is used to add a picture to your website?

A

< img >

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

What is the basic image element format/syntax?

A

< img src=” linktoimage “ >

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

How many header elements are there? What are the differences between each header element?

A

6

The text size

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

True or False: Comments are useful for making specific code inactive without having to delete it entirely.

A

True

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

What does the “main” HTML5 tag do?

A

It helps search engines and other developers find the main content of your page.

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

What is a simple way to differentiate between HTML tags and elements?

A

Tags are like the parents and elements are like the children

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

What element is used to add a picture to your website?

A

< img >

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

What is the basic anchor element format/syntax?

A

< a href=”https://wwwlinktocontentcom>Click here to go to LinktoContentcom< /a>

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

True or False: Image elements are self-closing.

A

True

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

True or False: ALL image elements MUST have an alt attribute

A

True

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

What is an alt attribute?

A

It is text that is displayed if a user’s computer is unable to load the image.

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

Using a <h2> element, assign an id called “contacts-header” with the viewable text labeled “contacts” and create an internal link with the same contacts label.</h2>

A

< a href= “#contacts-header” > Contacts < /a>

< h2 > Contacts < /h2 >

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

What is an anchor element and how is it written?

A

It is an element that is used to link content outside of your web page.

< a > < /a >

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

If you want to write an anchor element, but you don’t know what the link is going to be, what can you use as a dead placeholder?

A

Hash symbol (#)

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

What is href short for?

A

Hypertext Reference

23
Q

If you wanted to create an internal link within your webpage, what would be written after the href attribute?

A

< a href=”#id.attribute”> Example < /a >

24
Q

Before creating an internal link with the # attribute, what other attribute must be assigned first?

A

id

25
Q

What is the format/syntax of an assigned id attribute?

A

< h2 id= “#example-link” > Example < /h2 >

26
Q

Using a <h2> element, assign an id called “contacts-header” with the viewable text labeled “contacts” and create an internal link with the same contacts label.</h2>

A

< a href=”#contacts-header”> Contacts < /a >

< h2 id=”#contacts-header” > Contacts < /h2 >

27
Q

If you wanted a new window open when the user clicks a link, what attribute would you use?

A

target=”_blank”

28
Q

If you want to write an anchor element, but you don’t know what the link is going to be, what can you use as a dead placeholder?

A

Hash symbol (#)

29
Q

How do you turn an image into a link?

A

Put the image code within an anchor element. (Between the opening anchor tag and the closing anchor tag)

30
Q

What element would you use if you wanted to create an unordered list?

A

< ul > ul >

31
Q

What element is used to list items in both unordered and ordered lists?

A

< li > li >

32
Q

What element would you use if you wanted to create an ordered list?

A

< ol > ol >

33
Q

What element would you use if you wanted the user to type something in a field?

A

< input type=” text “>

34
Q

How would you insert placeholder text?

A

< input type=” text “ placeholder= “ this is placeholder text “ >

35
Q

What element and attribute is used to build a web form?

A

Element = form

Attribute = action

36
Q

What is the common syntax/structure of web forms?

A

< form action= “ /URL-to-where-you-want-to-send-form “ >
< input >
< /form >

37
Q

What element and attribute is used to add a submit button to a form?

A

Element = button

Attribute = type

38
Q

What is the common syntax/structure of adding a submit button?

A

< button type=”submit > this button submits the form < /button >

39
Q

If you wanted to require one of the fields of a form to be filled out, what attribute would you use and with what element is that attribute used in?

A

Attribute = required

It is used within the < input > element

40
Q

What is the common syntax/structure of adding the “required” feature?

A

< input type=”text” required >

41
Q

When would you use “radio buttons”?

A

When you want the user to only select one option from a list of multiple options.

42
Q

Which element are radio buttons associated with?

A

input

43
Q

What is the common syntax of adding radio buttons?

A

< label >
< input type=”radio” name=”example” > example
< /label >

44
Q

What is considered best practice that involves the < label > element and the < input > element that is nested inside?

What does that syntax look like?

A

Set a “for” attribute on the label element that matches the value of the “id” attribute of the input element

< label for=”example” >
< input id=”example” name=”another-example” > Example
< /label >

45
Q

If we wanted to add a type of input that would have the user check off checkboxes, what attribute would we use?

A

checkbox

46
Q

Which element are checkboxes associated with?

A

input

47
Q

What is the common syntax of adding checkboxes?

A

< label for=” example “>
< input id=” example “ type= checkbox name=”example” >Example
< /label >

48
Q

What does the value attribute do?

A

It tells the server which option the user selected. Without the value attribute, the server defaults to the selection “on” which is not useful.

49
Q

Which attribute is used to have a checkbox or radio button checked by default?

A

checked

50
Q

What is the common syntax when using the checked attribute?

A

< input type=”checkbox” name=”example” checked >

51
Q

What is the purpose of the div element?

A

It is a general purpose container for other elements

52
Q

At the top of every HTML document, what should you always type?

A

< !DOCTYPE html >

53
Q

When working with html, what should always be typed after < !DOCTYPE html >?

A

< html >

< /html >

54
Q

What is the difference between the < head > element and the < body > element?

A

The head element is the container for metadata (data about data)

The body element is what the user sees