Question
Create a web page named peace.html and an accompanying external JavaScript file named peace.js that displays a peace symbol with red, white, and blue colors.
Create a web page named peace.html and an accompanying external JavaScript file named peace.js that displays a peace symbol with red, white, and blue colors. For details, study the provided output. In addition to displaying a peace sign, you must also display an accompanying multi-line message at the right of the peace sign. The output does not show any message, so its up to you to be creative and make things look good.
Fill the top-left area with a light red color. Fill the top-right area with a light blue color. Allow the bottom area to display the default background-color, white.
You must implement a drawCanvas function that calls two helper functions one that draws the peace sign and one that draws the message.
As always, you will be graded on style and elegance. Include a comment above each shape that you draw. You must use named constants as appropriate for things like the peace signs center position and the thickness of the peace signs lines. If you have any named constants that are used in multiple functions, declare them at the top, above all the functions. For named constants used in a single function, declare them in the function in which they are used.
Output:
Extra credit color gradient. |
Multi-line message goes here. |
Peace Sign -> C f localhost: 15698/hw1/peace.html AM
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started