Intro to HTML Flashcards

(60 cards)

1
Q

POST method

A

The query string appears in the HTTP request body when the form submits data with the POST method.

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

What is the difference between the POST and GET method?

A

GET - The name=value pairs are sent through the URL and there are data amount limitations

POST - The name=value pairs are sent more securely by not showing them in the URL

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

What is the tag for comments?

A

<!-- -->

Ex. <!-- Example -->

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

Table structure

A

<table>
<tr>
<th></th> (or <td></td>)
<th></th>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>

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

What does the <form> element do?

A

The <form> element allows the web browser to submit information from the user to the server.

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

Query string

A

Query string is a set of name=value pairs separated by the ampersand character (&).

Example:
<form — type=”text” name=”first” id=”first”>

<input — type=”text” name=”last” id=”last”>
The query string would be first=John&last=Smith

Each “name” is specified as an attribute of the HTML field, and the “value” is the user-entered data, i.e., John Smith.

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

GET method

A

The GET method submits information to a web server by altering the URL of the HTTP request.

  1. Creates a query string.
  2. Creates an URL with the server page and name=value pairs that’s separated by a question mark. (http://example.com/apply?first=John&last=Smith
  3. Uses the newly created URL to create and send an HTTP GET request.
  4. Displays or updates the webpage using the HTTP response received from the server.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the required attributes for the <form>?

A

Action - Tells the browser where to send the form data. The action to be performed when the form is submitted.

Method - Indicates the HTTP request type the browser will use to communicate with the server using either “GET” or “POST” (GET being the default).

form — action=”Website” method=”POST”

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

enctype attribute

A

If a form field contains binary data such as an image, a POST request is split into multiple parts.

The <form> element’s enctype attribute value “multipart/form-data” indicates the web browser should split a POST request into multiple parts, where each input field is sent as a separate part of the HTTP request message.

<form — action=”website” method=”POST” enctype=”multipart/form-data”>

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

escaped and unescaped

A

Escaped - Encoded data that replaces special characters with codes that represent them to be correctly understood by the server.

Special characters are represented by a percent sign “%” followed by two hexadecimal digits that represent the character’s ASCII value.

Ex: “1 + 2 = ?” is “1+%2B+2+%3D+%3F”.

The “+” represents a space, 2B is the ASCII hex value for “+”, 3D is the ASCII value for “=”, and 3F is the ASCII value for “?”

Unescaped - The server determine what the original values of the data are.

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

widget

A

A widget is an interactive component (usually graphical) that the browser uses to interact with a user.

Ex: Buttons, drop-down menus, and data entry fields.

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

The “input” tag’s 5 attributes and their purpose.

A

The <input></input> element is a void element with five primary attributes:

type attribute - indicates the widget type. (text, password, submit, and button).

name attribute - names the widget and sends the widget’s value when the widget’s form is submitted.

id attribute - used to give a widget a unique identifier.

placeholder attribute - specifies text that first appears in a text widget, typically for giving the user a hint as to the expected value.

value attribute - specifies a default value for a widget.

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

text box

What tag does it belong to?

A

A text box widget is an <input></input> element with the attribute of type=”text” that allows users to enter a single line of text.

<input - type=”text” name=”status” id=”status” placeholder=”Your status”>

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

submit button

What element does it belong to?

A

The web browser displays a submit button widget for an <input></input> tag with the attribute of type=”submit”. A submit button uses the value attribute to specify the button’s text.

<input - type=”submit” value=”Send status”>

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

“label”

What is it’s attribute?

A

The “label” tag displays descriptive text associated with a specific widget.

A label has a “for” attribute whose “value” should match the “id” attribute for the widget being labeled.

Labels help people using screen readers understand what input is expected.

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

What is a “textarea” tag and what attributes belong to it?

A

A “text area” widget allows users to enter multiple lines of text.

It is a void element.

Optional attributes are “rows” and “cols” to specify the size of the text area.

<textarea - row=”2” cols=”6”>

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

Which attribute in the “input” tag should the “for” attribute match in the “label” tag?

A

The “for” attribute of the “label” tag should be equal to the “id” attribute of the “input” element to bind them together.

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

What does the value attribute do on a button?

A

The “value” attribute defines the text displayed on the button.

<input - type=”submit” value=”Submit Form”>

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

What code makes a checkbox initially appear selected?

A

<input - type=”checkbox” checked>

Ex.
<input - type=”checkbox” id=”birthday_today” name=”birthday_today” checked>

Sent to server as birthday_today=on

If there is no “value” attribute then the value defaults to “on”.

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

radio button

A

A radio button is a widget that allows users to select exactly one value from possibly many values.

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

Basic HTML page structure before adding content.

A

<!DOCTYPE html>

<html>
<head>
<meta - charset="UTF-8">
<title>Stephanie's Practice Page</title>
</head>
<body>
</body>
</html>

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

meta tag

A

<meta - charset=”UTF-8”>

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

What attribute changes ordered lists numbering style and unordered lists bullet point styles?

A

<ol - type =”A”>
<ol - type=”i”>

<ul - style=”list-style-type:square”>

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

favicon images

A

A favicon is a small icon that identifies a website and typically displays in a browser tab.

<link - rel=”icon” href=”favicon.png”>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Absolute vs. Relative URLs
An absolute URL is a complete URL. Ex: test A relative URL specifies the relative path to the web resource with no scheme or hostname. Ex: test
22
fragment identifier
A fragment identifier is a part of a URI that points to a specific section within a web page. It's essentially a bookmark within a URL. https://en.wikipedia.org/wiki/Computer_science#History Refers to the "History" section of the "Computer_science" page on Wikipedia. Code Ex.

Links to chapters: Chapter 1

section id="Ch1"

Chapter One

/section
25
Emoji
Emoji characters can be displayed in a webpage with a decimal or hexadecimal entity. Ex: The 😀 emoji can be displayed with 😀 Since emoji are characters, not images, emoji characters can also be copied and pasted into any HTML document. Ex:

🥰

.
26
entity
An entity is a mechanism for writing special characters or symbols in HTML The copyright symbol could be one of the following using either the entity name, decimal, or hexadecimal: (edit flashcard to see code) © © ©
27
Non-breaking characters
A non-breaking character is an inter-word character that doesn't show up on the same line together, i.e., half-time. "non-breaking hyphen" ‑, looks like a regular hyphen Ex: off‑campus displays "off‑campus" on the same line "non-breaking space", , looks like a single space but acts like a normal character in the middle of a word. Ex: 5 km displays "5 km" on the same line.
28
container
A container is any element that has opening and closing tags. Ex. The
    element is the parent container for all list items. Each
  1. element is the container for one list item.
29
parent container
A parent container is the container in which another element resides. Ex. The
    element is the
  1. element's parent container
30
checkbox
A checkbox is a widget for elements with the type attribute of "checkbox" (type="checkbox"), which allows users to check, or select, a value. For each checkbox selected, the browser sends the checkbox's name and value to the server. If a checkbox is not selected, the browser does not send anything to the server. If checked, the name=value is sent to the server in the form of name=on. "On" being the value because the checkbox was checked.
31
boolean attribute
A boolean attribute is an attribute that is true when present and false when absent. No value must be assigned to a boolean attribute. Ex.
32
radio button
A radio button is a widget for "input" elements with the attribute type="radio", which allows users to select exactly one value from possibly many values. The web browser groups radio buttons together with the same name attribute, where each possible value in a group has an associated input. Ex. "input type="radio" name="movie" value="ET""
33
drop-down menu element and attribute
The This code would create a drop-down menu with the option of either Football or Soccer.
34
list box
Displays a list of options, usually in a box with a scrollbar, and more than one option can be selected. A list box widget is created by specifying a size with the "select" element's "size" attribute. Ex: Creates a list box that shows four options at a time: select size="4" The "multiple" attribute allows the user to select multiple options.
35
button widget
A button widget can be created using the "button" element and has words on it like: Submit Login Share
36
password attribute and additional attributes that can be used with it
type="password" Password contents don't displayed on-screen.
37
"fieldset" and "legend" elements
The "fieldset" element groups related form widgets together and draws a box around the related widgets. The "legend" element defines a caption for a "fieldset".
Favorite Sitcom
Any type of widget can be grouped in a
. Fieldsets and legends benefit individuals that use assistive technologies like screen readers. CSS can be used to remove the rectangle if desired.
38
input picker
An input picker is a widget that allows the user to interactively pick a choice using a popup or other guided selection method.
39
What is a date picker and what are its attributes?
The date picker is an input picker that allows the user to enter a date or choose a date from a calendar popup. Attributes are "min" (the earliest date permitted) and "max" (the latest date permitted).
40
color picker
Clicking on the color picker creates a color selector popup that helps the user explore and choose a color. .
41
number input and its attributes
The "number" input ensures user input is a valid number. The "min" and "max" attributes are commonly used with the number input.
42
range input widget and its attributes
The range input widget allows the user to select a value by dragging a sliding control along the length of a line. Three commonly used attributes for the range input are "min", "max", and "value".
43
combo box
A combo box is the combination of a text box and drop-down menu into a single widget. A combo box is created with an "input" element, which creates the text box, and a "datalist" element, which provides the drop-down list options. The datalist lists all the list options. The user can quickly choose an option by typing part of the option, then selecting the option from the list of matching options. datalist - id="sport"
44
List the 4 specialized text input.
url - For typing a URL tel - For typing a telephone number email - For typing an email address search - For typing search terms Ex,
45
required attribute
States that the input is required and must not be left empty.
46
fallback
A fallback is a mechanism that allows a webpage element to function correctly even if the browser does not support a particular element.
47
polyfill
A polyfill is a fallback using JavaScript code that makes certain HTML features work on browsers that do not natively support those features. Developers often use a JavaScript library such as Modernizr to detect which features the browser does not support, and then load one or more polyfills to provide fallback mechanisms for the non-supported features.
48
Audio element What element is inside of it, and what are the 4 attributes, and what do they do?
The "source" element is used inside the "audio" element to specify an audio file to play. Different web browsers support different audio formats, so multiple "source" elements can be used to supply alternate file formats. Attributes (all of which are Boolean include: autoplay - makes the audio begin playing automatically. controls - displays audio controls for the user to play, pause, and control the volume. loop - replays the audio upon reaching the end of the audio. muted - initially mutes the audio. Ex.
49
"video" element What element is used within it and what are its attributes?
The "source" element is used in a "video" element to specify the name of the video file to play. Some common
50
"iframe" element
The "iframe" element allows a webpage to be embedded in a rectangular area of the current webpage. The "iframe" element uses the "src" attribute to specify the URL of the webpage to display and the "width" and "height" attributes to define the width and height in pixels of the rectangular iframe. Ex. "iframe width="460" height="250" src="https://www.youtube.com/embed/7g7kP_Trp0g?rel=0"" "/iframe" A YouTube video may be embedded in a webpage with the