HTML5 And CSS3 Flashcards

1
Q

Input type .. How do we get autocomplete to work.

A
Bind the input's list attribute to a lt data list> element.
input list="browsers">
datalist id="browsers">
  option value="Chrome">
  Etc.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Menu bar would be what in html5

A

nav

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

Cool input types .. Phone number

A

type = “tel”

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

How do we specify a title for a field set?

A

Under the .fieldset> tag, add

.legend>Category information./legend>

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

Canvas Text JavaScript…

A

var canvas1 = getElementById(‘canvas1’);
var context = canvas1.getContext(‘2d’); // 2d is required
context.font = ‘32pt Arial’;
context.fillStyle = ‘DeepSkyBlue’;
context.strokeStyle = ‘black’
context.fillText = (“Yahoo, it works!”, X, Y);
context.strokeText = (“Yahoo, it works!”, X, Y);

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

Input types for time and ul

A

Time and ul

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

What can be used to secure client/server communication - like login/password.

A

.keygen name=”security”> used in a form.

When the submit is pressed, all data is sent to the server using public key encryption….

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

Show steps for drawing shapes on canvas.

A

Get element, cox, then set strokeStyle to color, fillStyle to color, and lineWidth to pixels.

ctx3. beginPath();
ctx3. moveTo(100, 100);
ctx3. lineTo(150, 200), … Once the figure is closed:
ctx3. stroke(); // traces it then ctx3.fill(); // fills it
ctx4. closePath();

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

Show drawing arcs and circles

A

ctx.beginPath();
ctx.arc(Xcenter, Ycenter, radiusPx, startAngle, endAngleRadians, [false=counterclockwise]);
EndAngleRadians for full circle = Math.PI * 2
ctx.fill();

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

General areas of the html should be what kind of tag rather than did

A

section

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

How does a range deliver its value when the slider moves?

A

… type=”range” min=”500” max=”10000” onchange=
“updateReceivedValue(this.value)” >
Then implement the JavaScript function.

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

How to declare a canvas

A

.canvas id=’canvas1’ width=”400” height=”300”>./canvas>

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

When converting an html, a div with id=header, … How would this be updated in html5

A

Replace the div with header … /header and go to the CSS and remove the # from all #header tags.

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

Canvas drawing squares example

A

Get element by Id and getContext(‘2d’) from that.
Using context, fillStyle=”#ff000000”; // red
strokeStyle = “black”;
lineWidth=10; // of the stroke in prison
fillRect(X, Y, sizeX, sizeY);
strokeRect(X, Y, sizeX, sizeY);

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

Cool input types … Get a number between a min and max

A

type = “range” min=”1” max=”10”

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

Cool input types… How do we get a date picker

A

Type=”date”