HTML Flashcards

1
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
2
Q

Tag

A

Basic building block of HTML, describes content.

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

Opening Tag

A

Starts an HTML element, e.g., <h1>.

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

Closing Tag

A

Ends an HTML element, e.g., </h1>.

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

Self-Closing Tag

A

Tag that doesn’t require a closing counterpart.

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

How to structure tags?

A

Always close the most recently opened tag first

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

How to add a heading?

A

<h1>This is a heading</h1>

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

How many headings are there?

A

<h1> to <h6>, <h1> being the heading and the rest being subheadings
</h1></h6></h1>

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

How to use a paragraph tag?

A

<p></p>

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

What is the <div> tag?

A

Like a box. It has no meaning, but is given meaning on what is inside it.

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

What is the <span> tag?</span>

A

Like a <div> tag, but for style

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

What is the difference between a <div> tag and a <span> tag?</span>

A

<div> - whole width of the screen
<span> - hugs the content
</span></div>

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

What does <li> do?

A

Represents the item within a list

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

Ordered List

A

<ol> tag for numbered lists.
</ol>

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

Unordered List

A

<ul> tag for bulleted lists.
</ul>

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

How to use <ol> tags?

A

<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>

will output
1. Coffee
2. Tea
3. Milk

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

How to use <ul> tags>

A

<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>

will output
* Coffee
* Tea
* Milk

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

Button Tag

A

<button>Click me!</button>

19
Q

Image Tag

A

<img></img>

20
Q

src Attribute

A

Specifies the image source URL.

21
Q

alt Attribute

A

Describes the image for accessibility.

22
Q

<table></table>

A

Creates container for a table

23
Q

<thead></thead>

A

Container for header row

24
Q

<tbody></tbody>

A

Container for main body

25
Q

<tfoot></tfoot>

A

Container for the footer

26
Q

<th></th>

A

Table heading (header cell)

27
Q

<td></td>

A

Table data (creates a cell in table row, new column

28
Q

<tr></tr>

A

table row (creates a row)

29
Q

<caption></caption>

A

Used to create a title for a table

30
Q

<form></form>

A

A box, used before <div>, for things like <textrea>, <input></input> and <select> tags</select></textrea>

31
Q

Anchor tags

A

<a href= “www.example.com”>Example</a>

Example: what text will be displayed when used with a button

32
Q

What do you put at the top of your file?

A

<!DOCTYPE html>

33
Q

How to set the language?

A

<html></html>

34
Q

What is the meta tag for?

A

Display information of your website

35
Q

What does the <title></title>

A

The title of the website to be displayed on the google search

36
Q

What does <body></body> do?

A

Everything you see will be placed in it

37
Q

What does ! do in VsCode

A

Adds all the meta, html and !DOCTYPE tags for you

38
Q

What are non-sematic tags?

A

Generic tags. They have no meaning by themselves. Eg <div>, <span> etc</span>

39
Q

What are semantic tags?

A

Html that provides meaning to the website

40
Q

Where can class and id go?

41
Q

What does charset= “UTF-8” mean?

A

Tells the browser that our document is written in
the UTF-8 character set (letters/numbers/emojis etc)

42
Q

Example of a table

A

<table>
<caption>
Front-end web developer course 2021
</caption>
<thead>
<tr>
<th>Person</th>
<th>Most interest in</th>
<th>Age</th>
</tr>
</thead>
<tbody>
<tr>
<th>Chris</th>
<td>HTML tables</td>
<td>22</td>
</tr>
<tr>
<th>Dennis</th>
<td>Web accessibility</td>
<td>45</td>
</tr>
<tr>
<th>Sarah</th>
<td>JavaScript frameworks</td>
<td>29</td>
</tr>
<tr>
<th>Karen</th>
<td>Web performance</td>
<td>36</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Average age</th>
<td>33</td>
</tr>
</tfoot>
</table>

43
Q

Label and input tag

A

<label for= “first-name”>First name:</label>
<input type= “text” id= “first-name” name= “first-name” />

44
Q

Rule for label and input tags

A

for (in label) must match id (in input)
type - just make it the type of input you are doing