Create a page that displays an image, and uses JavaScript

Assignment Help Computer Engineering
Reference no: EM133140203

INFT 1024 Information Technology Fundamentals - University of South Australia

Assessment - CSS + JavaScript

This CA has two parts. First, create a page that displays an image, and uses JavaScript to allow the user to select which image is displayed. Secondly, use JavaScript to give the user the option to toggle the styling on your page.

Tasks

Select image using JavaScript
This CA requires you to create a HTML page incorporating JavaScript and CSS. Your HTML must include:
1. A correct document type,
2. Correct use of 'head' and 'body' elements,
3. Semantic HTML elements (e.g. 'main'),
L. One 'img' and one 'p' element. The 'img' should appear above the 'p' when viewing the webpage.
5. 5 'button' elements. Each button corresponds to one of the images, listed in the table below. The text shown in each button should be the birds name.
When the page is first viewed, one of the image/text combinations from the table below must be shown, using the 'img' and 'p' elements in your HTML. (You may choose any of the birds as the default image).

Button Name Image Text
Pardalote Pardalote by fir0002 (CC-by-NC)
Purple Swamp Hen Purple swamp hen by Toby Hudson (CC-by-SA) White-headed Stilt White-headed Stilt by JJ Harrison (CC-by-SA) Inland Thornbill

Inland Thornbill by Peter Jacobs (CC-by-SA) Rose Robin Rose Robin by JJ Harrison (CC-by-SA)

You need to include some JavaScript code to make your buttons interactive. When a user clicks one of the buttons, you need to make two changes to the page:
1. Change the displayed image to to the corresponding bird,
2. Update the 'p' element to display the photographer.
Notes: Your HTML must not contain 5 img elements.

CSS Toggle button
You are required to style your HTML page using two themes, and provide a button to toggle between them. To do this, you'll make two variables with the same name in different CSS selectors. For example:

:root {

--primary-color: rgb(255, 255, 255);

}

 

[data-theme="dark"] {

--primary-color: rgb(0, 0, 0);

}

This gives two different values for the same variable. You'll need to style the page using this variable (for example, style the heading color using `primary-color`. Refer to the CA3 if you can't remember how to do this).

To toggle between the two themes, you'll need to store a data attribute in the root HTML node. The CSS Learning Activity will guide you on this process. Additionally, this page shows the JavaScript method to set an attribute .
The steps you need to work through are:

1. Create two color palettes in your CSS. There must be 5 colors in each. You can choose any color values you like. The required variable names for your colors are:

primary-color

secondary-color

bg-color

font-color

2. Write a JavaScript function that runs when the 'Toggle Theme' button is pressed. The function should set the value of the 'data-theme' attribute to 'light' or 'dark', whichever is not currently selected.

Attachment:- Information Technology Fundamentals.rar

Reference no: EM133140203

Questions Cloud

What amount of distribution is reported as nontaxable return : A C corporation had accumulated negative earnings and profits (E&P) of $15,000 at the beginning of Year 4. What amount of distribution is reported as nontaxable
What would be the depreciation : What would be the depreciation for 2020, 2021, and 2022 if the property were nonresidential property purchased and placed in service November 10, 2003
Discuss suggestion for integrating COSO framework compliance : Discuss suggestions for integrating COSO framework compliance into a company in which you are familiar.
Identify whether the transaction is an example of financing : Listed below are eight transactions. In each case, identify whether the transaction is an example of financing, investing, or operating activities
Create a page that displays an image, and uses JavaScript : Create a page that displays an image, and uses JavaScript to allow the user to select which image is displayed - When the page is first viewed
What is the modified duration of this bond : Consider a 8.5 year U.S. corporate bond with a coupon of 3% p.a. that pays interest on a semi-annual basis. What is the modified duration of this bond
Enterprise architecture governance framework : Why is it so important to establish an Enterprise Architecture Governance framework? How does this transform "change management"?
How much is the net amount adjusted to retained earnings : Assuming nontrading securities - FVOCI, how much is the net amount adjusted to Retained earnings on the date of sale
What is its minimum price to break even : A piece of property is purchased for $25,000 and yields a $1500 yearly net profit. The property is sold after 10 years. What is its minimum price to break even

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd