"Structuring a page of content" assessment

Hei. Here is my “structuring oa page of content” assessment. Please have a look. Thanks :slight_smile:

https://thimble.mozilla.org/en-US/user/samiz/1887581/

When I try to view this, it gives me an authentication error. Don’t you need to publish the example first, and then give me the public URL that generates? There should be a “Publish” button that does this. The public URL should look something like https://thimbleprojects.org/yourusername/123456/

Oh! Sorry about that. I supposed, I sent you published version link. Could you please have a look on link below. I hope this link works well. Thanks

https://thimbleprojects.org/samiz/548519/

Hi @samiz! That works much better, thanks.

Your work looks good. The page structure seems to be all there. The only bits I noticed were:

  • Your “favorite photos” aren’t showing, but I don’t think you have the images uploaded to the thimble project. This is a minor point.
  • Your fonts aren’t working properly; I think this is because the formatting got messed up on the <link> element. It should be like this:

<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed|Cinzel+Decorative:700" rel="stylesheet">

But apart from that, great work!

1 Like

hello, i just finished the project so if you can look at it, thanks.

Hi there @Zupi,

I just had a look — your version looks perfect, well done on a great effort!

I just want to say thank you for this wonderful tutorial. After trying many tutorials, this is by far the best. I don’t go blank anymore when I’m thrown a project. hehe

@Let_Me_Help_You Fantastic, that is so nice to hear :wink:

Thank YOU!

Hello, I just finished. Please check

Birdwatching
 <!--[if lt IE 9]>

<![endif]–>

 <header class="img">

   <h1>Birdwatching</h1>
   <img src="dove.png" alt="a simple dove logo" class="img">

    <nav>
      <ul>
        <li><span>Home</span></li>
        <li><a href="#">Get started</a></li>
        <li><a href="#">Photos</a></li>
        <li><a href="#">Gear</a></li>
        <li><a href="#">Forum</a></li>
      </ul>
    </nav>
  </header>


 <main>
 <article>

    <h2>Welcome</h2>

  <p>Welcome to our fake birdwatching site. If this were a real site, it would be the ideal place to come to learn more about birdwatching, whether you are a beginner looking to learn how to get into birding, or an expert wanting to share ideas, tips, and photos with other like-minded people.</p>

  <p>So don't waste time! Get what you need, then turn off that computer and get out into the great outdoors!</p>

 </article>


   <aside>

    <h2>Favourite photos</h2>

  <a href="favorite-1.jpg"><img src="favorite-1_th.jpg" alt="Small black bird, black claws, long black slender beak, links to larger version of the image"></a>
  <a href="favorite-2.jpg"><img src="favorite-2_th.jpg" alt="Top half of a pretty bird with bright blue plumage on neck, light colored beak, blue headdress, links to larger version of the image"></a>
  <a href="favorite-3.jpg"><img src="favorite-3_th.jpg" alt="Top half of a large bird with white plumage, very long curved narrow light colored break, links to larger version of the image"></a>
  <a href="favorite-4.jpg"><img src="favorite-4_th.jpg" alt="Large bird, mostly white plumage with black plumage on back and rear, long straight white beak, links to larger version of the image"></a>
    </aside>

  </main>

  <footer>
    <p>This fake website example is CC0 — any part of this code may be reused in any way you wish. Original example written by Chris Mills, 2016.</p>

    <p><a href="http://game-icons.net/lorc/originals/dove.html">Dove icon</a> by Lorc.</p>
  </footer>

@kolisnikvladislav09 hello there, and thank you for submitting your assessment code!

I have had a look, and your code is really good — it does what it is supposed to do, and is pretty much the same as our version. Great work — well done!

Hi, I have done the given exercise please have a look. I have hosted my assignment on github after following the “publishing you website” from MDN. Please have a look. I am sharing the link below.

https://tushar9604.github.io/assets/assets/index.html

@tushar9604 On to this one now. The actual structure of this page looks perfect; the only thing I can see wrong is that the google fonts link oin the header isn’t working — it looks like it has got a bunch of escape characters in it:

<link href="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DRoboto%2BCondensed%3A300%7CCinzel%2BDecorative%3A700" rel="stylesheet">

So the fonts are not applying correctly. In our version it looks like this:

<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300|Cinzel+Decorative:700" rel="stylesheet">

@chrisdavidmills thanks for the feedback.
I changed the url from the original because when I validated my page from
https://validator.w3.org/nu/
It gave error like


so I used the url encoding to convert it to corresponding valid url but I didn’t realise that it was not working.
Now I just changed the “|” character to corresponding url encode “%7C”. It is working and validating fine now. But I don’t understand why is the complete encoded url
https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DRoboto%2BCondensed%3A300%7CCinzel%2BDecorative%3A700
is not working. Can you tell me why it is not working?
Birdwatching
<!--[if lt IE 9]>
  <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<header>

  <h1>Birdwatching</h1>
  <img src="dove.png" alt="a simple dove logo">

<nav>
  <ul>
    <li><span>Home</span></li>
    <li><a href="#">Get started</a></li>
    <li><a href="#">Photos</a></li>
    <li><a href="#">Gear</a></li>
    <li><a href="#">Forum</a></li>
  </ul>
</nav>

</header>

<main>

  <article>

    <h2>Welcome</h2>

    <p>Welcome to our fake birdwatching site. If this were a real site, it would be the ideal place to come to learn more about birdwatching, whether you are a beginner looking to learn how to get into birding, or an expert wanting to share ideas, tips, and photos with other like-minded people.</p>
  
    <p>So don't waste time! Get what you need, then turn off that computer and get out into the great outdoors!</p>
  
  </article>

  <aside>

    <h2>Favourite photos</h2>

    <a href="favorite-1.jpg"><img src="favorite-1_th.jpg" alt="Small black bird, black claws, long black slender beak, links to larger version of the image"></a>
    <a href="favorite-2.jpg"><img src="favorite-2_th.jpg" alt="Top half of a pretty bird with bright blue plumage on neck, light colored beak, blue headdress, links to larger version of the image"></a>
    <a href="favorite-3.jpg"><img src="favorite-3_th.jpg" alt="Top half of a large bird with white plumage, very long curved narrow light colored break, links to larger version of the image"></a>
    <a href="favorite-4.jpg"><img src="favorite-4_th.jpg" alt="Large bird, mostly white plumage with black plumage on back and rear, long straight white beak, links to larger version of the image"></a>

  </aside>  

</main>

<footer>
  <p>This fake website example is CC0 — any part of this code may be reused in any way you wish. Original example written by Chris Mills, 2016.</p>

  <p><a href="http://game-icons.net/lorc/originals/dove.html">Dove icon</a> by Lorc.</p>
</footer>

Hi there @deyanveljkovic! I’ve checked out your work on this assessment, and it looks very good; I can’t see any problems with it at all. Well done!

Thanks, thanks a lot

Hello, can someone check my “Structuring a page content” assessment? Thank you!

Hi there @syon04, thanks for sending your code in, and sorry for taking so long to answer you.

I have tested it, and it looks pretty much perfect; well done on some great work.

Hi, this is my second assessment. :smiley: I put my markup through the HTML validator and I’m not sure what to do about the article needing a heading. I know for good practice the <link> for googlefont should be in the CSS file. This is just for practice, so I think I will let that slide. I also have a question whether it is necessary to put the <nav> bar inside the <header>? I thought if screen readers want to scroll to the nav bar immediately, it would be easier designed this way. I’m not sure.

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="author" content="Caroline Rozali, MDN">
  <link rel="stylesheet" href="style.css">
  <title>Birdwatching</title>
  <link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300|Cinzel+Decorative:700" rel="stylesheet">

  <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>

<body>
  <header>
    <h1>Birdwatching</h1>
    <img src="img/dove.png" alt="a simple dove logo">
  </header> <!-- end of header-->

  <nav>
    <ul>
      <li><span>Home</span></li>
      <li><a href="#">Get started</a></li>
      <li><a href="#">Photos</a></li>
      <li><a href="#">Gear</a></li>
      <li><a href="#">Forum</a></li>
    </ul>
  </nav> <!-- end of nav-->

  <main>
    <article>
      <section>
        <h2>Welcome</h2>

        <p>Welcome to our fake birdwatching site. If this were a real site, it would be the ideal place to come to learn more about birdwatching, whether you are a beginner looking to learn how to get into birding, or an expert wanting to share
          ideas, tips, and photos with other like-minded people.</p>

        <p>So don't waste time! Get what you need, then turn off that computer and get out into the great outdoors!</p>
      </section> <!-- end of section-->
    </article> <!-- end of article-->
    <aside>
      <h2>Favourite photos</h2>

      <a href="favorite-1.jpg"><img src="img/favorite-1_th.jpg" alt="Small black bird, black claws, long black slender beak, links to larger version of the image"></a>
      <a href="favorite-2.jpg"><img src="img/favorite-2_th.jpg" alt="Top half of a pretty bird with bright blue plumage on neck, light colored beak, blue headdress, links to larger version of the image"></a>
      <a href="favorite-3.jpg"><img src="img/favorite-3_th.jpg" alt="Top half of a large bird with white plumage, very long curved narrow light colored break, links to larger version of the image"></a>
      <a href="favorite-4.jpg"><img src="img/favorite-4_th.jpg" alt="Large bird, mostly white plumage with black plumage on back and rear, long straight white beak, links to larger version of the image"></a>
    </aside> <!-- end of aside-->
  </main> <!-- end of main-->

  <footer>
    <p>This fake website example is CC0 — any part of this code may be reused in any way you wish. Original example written by Chris Mills, 2016.</p>

    <p><a href="http://game-icons.net/lorc/originals/dove.html">Dove icon</a> by Lorc.</p>
  </footer> <!-- end of footer-->

</body>

</html>

Thanks in advanced!

Hi there @UnorthodoxThing,

I’ve had a look at this, and it looks pretty good; there is nothing seriously wrong here.

To answer your questions:

  1. To get rid of the validator error about needing a heading in the <article>, you could just delete the <section> element. You don’t really need both. As long as your content has one suitable semantic container, you are OK, and you could justify using either <section> or <article>. But you don’t need both. The difference in semantics between <article> and <section> is subtle and can be confusing. Happy to go into it further if you want :wink:
  2. You can’t really put a <link> inside another linked CSS file; to be honest, having two <link>elements is fine. I think you can use an @import statement with Google Fonts inside your <link> element, e.g. something like
@import url('https://fonts.googleapis.com/css?family=Oleo+Script&display=swap');

but this is still generating the same number of HTTP requests, so I’m not convinced it gives you much advantage.

  1. It is not necessary to put <nav> inside <header>; that’s just the stylistic choice I made when I designed this example. I am fine with either. Most screenreaders do recognise the <nav> element, which allows their users to find the page’s main navigation more easily. But this happens either way.

Good questions!

1 Like