HTML Flashcards

1
Q

What does HTML stand for?

A

Hyper Text Markup Language

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

What is a markup language?

A

A computer language that uses tags to define elements with a document.

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

What does HTML consist of?

A

HTML consists of a series of elements.

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

What is the declaration element of a HTML page which defines a document?

A

<!DOCTYPE html>

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

What is a element which we call the root element of a HTML page?

A

<html>
</html>

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

What is the element that contains information about the HTML header in the page?

A

<head>
</head>

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

What is the element that specifies a title for the HTML page (which is shown in the browser’s title bar or in the page’s tab)?

A

<title>
</title>

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

Wht is the element that defines a document’s body? It is the container for all visible content (headings images, tables, etc.)

A

<body>
</body>

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

What is the element that defines a large heading?

A

<h1>
</h1>

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

What is the element that defines a paragraph?

A

<p>
</p>

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

How is a HTML defined?

A

By a start tag and end tag <tagname> Content goes here...</tagname>

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

Are HTML elements case sensitive?

A

No

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

What must all HTML document start with?

A

A document type declaration <!DOCTYPE html>

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

What does the HTML begin with and end with?

A

The root element <html> </html>

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

What is the visible part of the HTML document?

A

It’s sandwiched between <body> and </body>

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

How many types of headings sizes are there?

A

6 (ex. <h1> </h1>, <h6></h6>)

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

How can you change the default size of a HTML heading?

A

Using a CSS font-size property (ex. <h1 style="font-size:60px;"> Heading 1</h1>

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

What is an HTML attribute?

A

All HTML elements have attributes which provide additional information about elements

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

What do HTML attributes come in?

A

name/value pairs like name=”value”

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

What is a HTML style attribute used for?

A

To add styles to an element, such as color, font, size, and more.

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

What syntax does the HTML style attribute have?

A

<tagname> (ex. <p> I am red</p>
</tagname>

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

What is the syntax for the image tag?

A

<img></img>

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

What is the src part of a image syntax?

A

Specifies the path (URL) to the image (required)

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

What is the alt part of the image syntax?

A

Specifies an alternate text for the image (if the browser cannot find the image)

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

How would you add a style attribute to specify the width and height of an image?

A

<image>
</image>

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

What is the HTML link syntax?

A

<a>link text</a>

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

How would you hyperlink an image?

A

Put the <img></img> tag inside the <a> tag (ex. <a href=”link”<img src-“image example.gif” alter = “HTML Chapter” </a>

28
Q

What is the HTML form element?

A

It is a container for different types of input elements such as: text fields, checkboxes, radio buttons, submit buttons etc.

29
Q

What is the syntax for the form element?

A

<form> </form>

30
Q

What is the most used form element?

A

<input></input>

31
Q

What is the syntax for a type attribute?

A

<input></input>

32
Q

What are the most used type attributes?

A

Text, radio, checkbox, submit, button, and password

33
Q

What must a type attribute have for text?

A

A name (require to send to server), value (initial value), and ID Attribute (unique ID in HTML document)

34
Q

What’s the syntax for a first name text attribute?

A

First name: <input type = “text” name = “first_name” value = “John”

35
Q

What’s the syntax for a submit attribute?

A

<input></input>

36
Q

What is the syntax for a Radio input type?

A

<input></input> HTML

37
Q

What is the syntax for a checkbox attribute type?

A

<input></input> HTML

38
Q

What is the syntax for a button with an alert?

A

<input type=”button onclick=”alert(‘Hello World!’)” value=”Click Me!”>

39
Q

What is the syntax for a text box that exceeds a single sentence?

A

<textarea> enter description here. </textarea>

40
Q

What is the syntax for a dropdown list?

A

<select id=”cars” name=”cars”?
<option>Audi</option>
</select>

41
Q

What is the fieldset element used for?

A

To group related data in a form

42
Q

What is the syntax for a fieldset element?

A

<fieldset> </fieldset>

43
Q

What does a legend element do?

A

It defines a caption for the <fieldset> element

44
Q

What is the syntax for a legend element?

A

<legend> </legend>

45
Q

What is the syntax for a email input type element?

A

<label for=”email>Enter your email:</label>
<input></input>

46
Q

What does a label element do?

A

It creates a caption for form control

47
Q

What are the 2 types of ways to pair label with an input?

A

Implicit and Explicit

48
Q

What is an implicit label?

A

It wraps the input in a label (ex. <label>
Name:
<input></input>
</label>

49
Q

What is an explicit label?

A

It adds an attribute to the label and an id to the input
<label>Name: </label>
<input></input>

50
Q

What is the input type syntax for a date?

A

<input></input>

51
Q

What is the input type syntax for a month drop-down?

A

<input></input>

52
Q

What is the input type syntax for a number input field?

A

<input type=”number” id=”quantity” name=”quantity” min=”1” max=5”>

53
Q

What is the size attribute?

A

It specifies the vidsible width, in characters, of an input field

54
Q

What is the default value for a size attribute?

A

20

55
Q

What is the a syntax example of using a size attribute with a text input attribute?

A

<input></input>

56
Q

What is a place holder attribute?

A

It specifies a short hint that describes the expected value of an input field.

57
Q

What is the syntax for a placeholder attribute for a telephone input?

A

<input type=”tel” id=”phone” name=”phone” placeholder=”123-45-678”

58
Q

What is a required attribute?

A

It specifies that an input field must be filled out before submitting the form.

59
Q

What is some example syntax of a required attribute with a text input element?

A

<input></input>

60
Q

What is the autofocus attribute?

A

It specifies that an input field should automatically get focus when a page loads.

61
Q

What does a <datalist> element show?</datalist>

A

The input list attribute refers to a <datalist> element that contains pre-defined values for an <input></input> element</datalist>

62
Q

What’s an example of a datalist element with a input list?

A

<input></input> <datalist>
<option>
</datalist></option></datalist>

63
Q

What is the syntax for a reset button?

A

<input></input>

64
Q

What is the range input type?

A

It can be used for entering a numerical value within a specific range

65
Q

What is an syntax example of a range input type?

A

<input></input>

66
Q

What is the time input type?

A