HTML Flashcards

1
Q

How to create ordered and unordered lists in HTML?

A

List-style-type properties:

ol { list-style-type: disc; }

‘disc’ may also be:

  • none : No marker
  • disc (default), circle, square
  • Decimal: 1, 2, 3, etc.
  • upper-roman: I, II, III, IV, V, etc.
  • lower-alpha: a, b, c, d, e, etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to comment in HTML & CSS

A

HTML < ! – … – >

CSS /* … */

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

What do the following HTML tags do

  • < pre >
  • < blockquote >
  • < q >
  • < code >
  • < del >, < ins >
  • < abbr >
  • < dl >, < dt >, < dd >
A
  • < pre > a large section of pre-formatted text (block)
  • < blockquote > a lengthy quotation (block)
  • < q > a short quotation (inline)
  • < code > code font
  • < del >, < ins > crossing-out, inserting; content that should be considered deleted or added to the document (inline)
  • < abbr > an abbreviation, acronym, or slang term (inline)
  • < dl >, < dt >, < dd > defintion lists;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how to represent unicode characters

A

using & followed by other characters

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

how to add a favicon

A

< link rel="shortcut icon" type="image/png" href="/favicon.png"/ >

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

Table Syntax

A

< table > starts and ends

< th > table header (centred, bold)

< tr > table row

< td > table data

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

How can the appearance of tables be modified

A
  • gridlines
  • borders < table border=“2” >
  • background color
  • cellspacing, cellpadding
  • placement
  • size (width, height)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

examples of arguments of the < input > tag

A
  • type: specifies type of an element (checkbox, button, …)
  • name: the name of the element
  • id: a unique identifier for the element
  • value: the “value” of the element; used in different ways for different values of type
  • readonly: the value cannot be changed
  • disabled: the user can’t do anything with this element
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are form arguments + examples?

A

< form arguments > … < /form >

form arguments tell what to do with the user input

(arguments are attributes because name=”value”)

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

examples of < input > tag form elements

and what is a type argument in forms

A
  • Most* form elements use the input tag, with a type=”…” argument to specify type of element
  • < input type=”text” name=”textfield” value=”with an initial value” />
  • buttons
  • checkboxes
  • radio buttons
  • drop-down menus

textarea is an example with no input tag: < textarea name=“”>

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

What are form parameters?

A

The form’s parameters tell JavaScript how to send the information to the server (either via POST or GET)

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

What are the different types of buttons

and how do you code them?

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

What is the effect of radio buttons and how they work?

A

If two or more radio buttons have the same name, the user can only select one of them at a time (a radio button “group”).

If you ask for the value of that name, you will get the value specified for the selected radio button

Radio buttons do not contain text, as with checkboxes.

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

What is the role of labels in forms?

A

They extend the “control” of interacting with the form element over to the respective text.

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

What is the code for checkboxes?

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

What is the code structure of drop-down menus / lists?

A
17
Q

What is the code structure of hidden fields + uses?

A
18
Q

Benefits of validated and standardised HTML?

A
  • more rigid and structured language
  • more interoperable across different web browsers
  • more correct display of content
  • interchangable with other XML data
19
Q

What is HTML(5)?

A

It is the fundamental markup language of the WWW.

Semantic markup: makes implied meaning explicit

  • Better for Humans: (human readable; better accessibility support)
  • Better for Machines: (better searching; better for accessibility technologies)

Separating form from content: (completely removes styling from tags)

Better support for multimedia (native browser support — no plugins needed)

HTML5 is backwards compatible with XHTML and one will not necessarily replace the other

20
Q

< img > tag

A

if the img tag is wrapped around with a link, the the browser will open up that img fully.

21
Q

What are semantic tags?

A

A semantic tag clearly describes its meaning to both the browser and developer. They define different parts of a webpage: < article >, < footer >

Examples of non-semantic elements: < div > and < span >. They tell nothing about its content.

22
Q

< meta > tag code examples

A
23
Q

define frameworks / libraries

A

a cohesive set of library codes that simplifies the computer language (accelerates development via shortcuts and best practices)

  • Bootstrap (for HTML)
24
Q

minimum HTML structure

A
25
Q

element vs. tag

A
26
Q

characterstics of an HTML attribute

A

< a href=“http://google.com”>some text

  • defines the property of an element
  • placed within start tag
  • consist of name/key and a value, separated by =
    • attribute value can remain unquoted if it doesn’t contain space characters or any of “ ‘ ` = <>
    • If the value is the empty string, the value and “=” character can be omitted.
27
Q

< b > and < i >

A
  • text in an “alternate voice”, such as transliterated foreign words, or technical terms
  • “stylistically offset” text, such as keywords and typographically emboldened text