Learn CSS Flexbox by Building a Photo Gallery - Step 4

I am not quite sure what I am doing wrong,
The question is
Add a header element within the body element and assign a class of header to it.

Inside the header, create an h1 with css flexbox photo galleryas the text.

And I thought I got this right but apparently not? Please help !

<!-- file: index.html -->
<!DOCTYPE html>
  <head lang="en">
    <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Photo Gallery</title>
    <link rel="stylesheet" href="./styles.css">
    <div class="header">
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Safari/605.1.15

Challenge: Learn CSS Flexbox by Building a Photo Gallery - Step 4

Link to the challenge:

a header element, not a .header div element
<header></header> is a header element

so how do i assign class header to it ? I tried different solutions and they all were incorrect.

once you have a header element created, add the class attribute to the opening tag as usual and give it the value header

1 Like

It worked, appreciate your help I was stuck with this question for the past two hours

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.