HTML Tags and Their Functions Flashcards

1
Q

What should the <body> NOT include?

A

<h1>
</h1>

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

Which is smaller? <h2> or <h4>?

A

<h4>
</h4>

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

What does the <em> tag do to the text is surrounds?</em>

A

Makes it Italic

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

What does the <strong> do for the text it surrounds?</strong>

A

Makes it bold

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

What tag do you use for metadata elements and your webpage title for the browser?

A

<head></head>

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

What should all website codes start with?

A

<!DOCTYPE html>

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

What attribute do you add to an <a> to turn it into a useable link?</a>

A

href

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

What attribute and value can be used for the <img></img> to make it load only when the user scrolls to that part of the page?

A

loading=”lazy”

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

What syntax do you use for adding notes to your code?

A

<!-- and -->

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

What attribute and value do you use when you want your link to open in a new tab?

A

target=”_blank”

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

What self-closing tag allows you to add a line that shows up on the page to divide up sections?

A

<hr></hr>

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

What attribute pairs with an input tag to put replaceable text in a typed field to give a hint to viewers what to input?

A

placeholder

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

What attribute and value can be paired with an <input></input> to make circular buttons that you can only select one of?

A

type=”radio”

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

What attribute can be paired with a checkbox or radio input to select one or more options automatically? (hint, it doesn’t require a value)

A

checked

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

What tag(s) do you use for list items?

A

<li></li>

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

The semantic tag <address></address> will to what to the text inside it?

A

Make it italic

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

What semantic tag groups an image and its caption together?

A

<figure></figure>

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

What tag(s) do you use for a caption on an image?

A

<figcaption></figcaption>

19
Q

What attribute should be included with all images in case they fail to load or a screen reader is involved?

A

alt

20
Q

When an image is just for decoration what attribute and value do we use?

A

alt=” “

21
Q

What is the second tag(s) that should be included in all websites?

A

<html></html>

22
Q

What attibute and value do we use with the <html> to indicate that the page is in english?

A

lang=”en”

23
Q

If there are no appropriate semantic tags to use, what attibute can be given to any element to indicate to assistive technology what the elements are for?

A

role

24
Q

If you use a <div> to make your own custom picture, what attribute and value can use to indicate that to a piece of assistive technology?

A

role=”img”

25
Q

What attribute will hide content from assistive tech but still be visible on your page?

A

aria-hidden

26
Q

What tag(s) do you use to collect inputs from a user?

A

<form></form>

27
Q

What tag(s) should be used to group related inputs together and by default displays a border around it?

A

<fieldset></fieldset>

28
Q

What tag can go inside of <fieldset> to give it a caption/label inside the border?

A

<legend></legend>

29
Q

What attributes can be used to define the size of a <textarea>?</textarea>

A

rows and cols

30
Q

Which attribute goes with <label>, “for” or “id”?</label>

A

for

31
Q

Which attribute goes with <input></input>, “for” or “id”?

A

id

32
Q

What attribute can be given to an <input></input> to make it that a user cannot submit a form without inserting information into it? (hint, it doesn’t have a value)

A

required

33
Q

What attribute would you use if you wanted to require a certain amount of characters for a password?

A

minlength

34
Q

What attribute would allow you to program specific parameters for password requirements?

A

pattern

35
Q

What tag(s) allow you to make a dropdown menu?

A

<select></select>

36
Q

What tag(s) allow you to put items in your dropdown menu?

A

<option></option>

37
Q

What attribute do you use to give an <option> meaning toward your data?</option>

A

value

38
Q

What attribute and value should you give to this set of code so that it doesn’t interfere with your data?

<option>(select one)</option>

A

value=” “

39
Q

What attribute do you use to change the text on a submit button?

A

value

40
Q

What attribute can you use instead of role to make sure that screen readers will defintely read it?

A

aria-labelledby

41
Q

What class is usually given to <span> that we wish for only screen readers to see></span>

A

sr-only

42
Q

What attribute and value do you use when you want a screen reader to not read certain elements?

A

aria-hidden=”true”

43
Q

What is the difference between the attribute cite and <cite>?</cite>

A

The attribute displays the source of a quote only within the code and the tag displays it alongside the quote.