Basic HTML and HTML5 Flashcards

1
Q

Elements for headings:

A

< h1 > - < h6 >

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

Paragraph element:

A

<p></p>

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

How to leave comments in HTML:

A

< ! - - here - - >

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

How to add images in html:

A

< img src = “ “>

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

Paragraph element:

A

<p></p>

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

What is an alt attribute?

A

An alt attribute is used for screen readers to improve accessibility and is displayed if the image fails to load.

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

Alt attribute example:

A

< img src = “picture.jpg” alt = “guy doing stuff” >

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

How to link external pages with anchor elements:

A

< a href= “website.com” >this links to my website < /a >

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

How to link to internal sections of a page with Anchor elements:

A

Create an < a href= “id attribute” >jump to bottom< /a > and add that id attribute to an element on the bottom of the page.

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

Which anchor tag attribute opens a new tab?

A

< a target=”_blank” href =……. < /a >

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

How to nest an anchor element within a paragraph:

A

< p >
Hello here’s a link to < a target = “_blank” href = “brains cape.com” > brainscape.com < /a >
< /p >
(Only the brainscape is highlighted)

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

How do you make Dead links?

A

replacing a href attribute value with a #. (ex: a href: “ # “

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

How to turn an image into a link?

A

Nest the image within an A element.

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

How to create bulleted unordered list:

A

Use the < ul > element and follow it up with < li > elements for every entry in the list.

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

How to create an ordered list:

A

Use the < ol > element and follow it up with < li > elements for every entry in the list.

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

How to create a text field:

A

< input type= “text” >

17
Q

How to add a placeholder to a text field:

A

< input type= “text” placeholder: “type here” >

18
Q

How to create a form element:

A

< form action= “/url-where-you-want-to-submit-form-data” >< /form >

19
Q

How to add a submit button to a form:

A

Nest this within a form element < button type =”submit” >Submit< /button >

20
Q

How to make a text field required:

A

Add the word required after input type. (ex: < input type=”text” required >)

21
Q

How to create a set of radio buttons

A

< label for=”option 1” >
< input id=”option 1” type=”radio” name=”1-2” >Indoor
< /label >

22
Q

How to create a set of checkboxes:

A

< label for=”option 1” >< input id=”option_1” value=”option 1” type=”checkbox” name=”options”> Option 1< /label >

23
Q

How to use the value attribute with Radio Buttons and Checkboxes

A

< label for=”option 1” >
< input id=”option 1” type=”radio” name=”1-2” >Indoor
< /label >

24
Q

How to check Radio Buttons by default

A

< input type=”radio” name=”test-name” checked >