Resources
- //INPUT: Buttons
- //INPUT: Text
- //INIT: Using variables
- //PROCESS: Basic math
-
//OUTPUT:
alert()
,.innerHTML
, andconsole.log()
- //OUTPUT: Changing text styles
- //OUTPUT: Changing an element's position
- //STYLE: Use cut and paste where possible
- //STYLE: Space out mathematical expressions
Evaluation
-
___/10 HTML-CSS:
including ANY TEN of the following:
- a
<span>
- a heading
- a table
- a
div
for output - a list
-
a descriptive paragraph
The following must be inside<style>
:
- applying a style to a tag
- applying a style to an #ID or .class
- applying a color, opacity, or background color
- applying a border
- applying a font size
- applying the font family, style, or weight
- applying a width
- applying text-align or vertical-align
- applying a position
- applying a top measurement
- applying a left measurement
- applying a display style
- applying margin-left or margin-right
- a
-
___/10 INPUT: including ANY FOUR of:
- a text area box
- an input line
- buttons
- things that work with
document.getElementById().onclick
- things that work with
document.getElementById().onchange
-
___/10 PROCESS: including:
- successfully reading a text input
- assigning a variable
- using basic math (font-size, probably)
- using
parseInt()
orparseFloat()
-
___/10 OUTPUT: including ANY FOUR of:
- changing the color or background using Javascript
- changing the weight or style of a font using Javascript
- changing the size of a font using Javascript
- changing the top or left position of something using Javascript
- changing the border or width of something using Javascript
- output using
.innerHTML
-
___/10 STYLE:
- add your name to the filename
- write your name as the author
- update the change log
- correctly indent everything
- use lowercase for all your HTML tags
- use camelCase for all your ids and classes
- avoid lines greater than 96 characters in length
- restrict your style code to the head of your HTML file
- space out your mathematical operators
- write comments for your if statements
- use descriptive variable names
Saving your work
Use Save as...
to save the
empty template as
"2.05H-FontStyleConsole-LastName.html
"
in your Computer Programming 12 directory.
The assignment
Create a page that uses Javascript to adjust font characteristics live.
- create the HTML of your page, including:
- a header
- buttons
- text inputs
- a table to contain it all
- a
div
to use for output - give things IDs so they can be accessed
- add
onclick
andonchange
Javascript triggers - add functions to change the styles of your text example
For example
Please enter the text to be styled:
weight: | |
---|---|
style: | |
border: | |
background: | |
color: | |
size: |