HTML5 And CSS3 Flashcards
Input type .. How do we get autocomplete to work.
Bind the input's list attribute to a lt data list> element. input list="browsers"> datalist id="browsers"> option value="Chrome"> Etc.
Menu bar would be what in html5
nav
Cool input types .. Phone number
type = “tel”
How do we specify a title for a field set?
Under the .fieldset> tag, add
.legend>Category information./legend>
Canvas Text JavaScript…
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);
Input types for time and ul
Time and ul
What can be used to secure client/server communication - like login/password.
.keygen name=”security”> used in a form.
When the submit is pressed, all data is sent to the server using public key encryption….
Show steps for drawing shapes on canvas.
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();
Show drawing arcs and circles
ctx.beginPath();
ctx.arc(Xcenter, Ycenter, radiusPx, startAngle, endAngleRadians, [false=counterclockwise]);
EndAngleRadians for full circle = Math.PI * 2
ctx.fill();
General areas of the html should be what kind of tag rather than did
section
How does a range deliver its value when the slider moves?
… type=”range” min=”500” max=”10000” onchange=
“updateReceivedValue(this.value)” >
Then implement the JavaScript function.
How to declare a canvas
.canvas id=’canvas1’ width=”400” height=”300”>./canvas>
When converting an html, a div with id=header, … How would this be updated in html5
Replace the div with header … /header and go to the CSS and remove the # from all #header tags.
Canvas drawing squares example
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);
Cool input types … Get a number between a min and max
type = “range” min=”1” max=”10”