Lab Workbook: European Art History Gallery Webpage
Objective: To create a media gallery webpage showcasing European art from the 1500 Renaissance to the 18th Century using Flexbox and CSS for styling and layout.
Exercise 1: Add interactivity with JavaScript to filter artworks based on the art period.
Exercise 2: Implement a lightbox feature for viewing artwork images in full size when clicked.
Exercise 3: Create a dynamic timeline slider to navigate through different art periods on the webpage.
This workbook provides a structured approach to building a gallery webpage for European art history. It covers key concepts in HTML and CSS, including Flexbox for layout and responsive design. The exercises encourage students to enhance the webpage with interactive features and dynamic content.
Exercise 1: Add interactivity with JavaScript to filter artworks based on the art period: provide detailed CSS and HTML to deliver Exercise 1: Add interactivity with JavaScript to filter artworks based on the art period.
To implement Exercise 1, where we add interactivity with JavaScript to filter artworks based on the art period, we will need to modify the existing HTML structure and add CSS for styling the filter buttons. We will also write JavaScript to handle the filtering functionality.
Step 1: Update the HTML Structure
Add buttons for each art period at the top of the gallery for filtering:
This JavaScript code adds an event listener to each filter button.
When a button is clicked, it sets the display of each art period section based on the data attribute of the button. This allows the user to filter the artworks by the selected period.
With these steps, you should have a functional filter for your gallery webpage that allows users to view artworks based on the chosen art period.
Want to print your doc? This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (