Skip to content

Commit

Permalink
Front-end Development: Added questions 49, 50 and 51 (#2614)
Browse files Browse the repository at this point in the history
* Added questions 49, 50 and 51

Check question 51, not sure about the answer.

I had done the quiz today, 08/11 and I had found some questions that were not in the repo.

* Changed Q51- answer

Changed Q51- answer after @vanekbr review.
  • Loading branch information
belce1982 authored Nov 8, 2021
1 parent 618a404 commit a74bf96
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions front-end-development/front-end-development-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -467,3 +467,31 @@ console.log(currencies);

**clear: left;**
`When we use the float property, and we want the next element below (not on right or left), we will have to use the clear property. When clearing floats, you should match the clear to the float: If an element is floated to the left, then you should clear to the left. Your floated element will continue to float, but the cleared element will appear below it on the web page.`

#### Q49. You want to create striped table rows using CSS without adding a class to any element. Which CSS would correctly apply the background color to every odd row in your table?

- [ ] `tr:nth-child(2) { background-color: #ccc; }`
- [x] `tr:nth-child(2n+1) { background-color: #ccc; }`
- [ ] `tr:nth-child(2+1) { background-color: #ccc; }`
- [ ] `tr:nth-child(2n) { background-color: #ccc; }`

[Source: W3Schools](https://www.w3schools.com/cssref/sel_nth-child.asp)

#### Q50. You are designing a site and creating a navigation bar linking to the main sections. Which HTML element should you use to indicate that this is the main navigation?

- [x] `<nav>`
- [ ] `<navigation>`
- [ ] `<main>`
- [ ] `<ul>`

[Source: W3Schools](https://www.w3schools.com/tags/tag_nav.asp)

#### Q51. You discover that CSS is being loaded on a website using the following code. Why might a web developer have done this?
`<link rel="preload" href="styles.css" as="style" onload="this.onload=null;this.rel='stylesheet'"><noscript><link rel="stylesheet" href="style.css"></noscript>`

- [x] The CSS is being loaded asynchronously in order to prevent render blocking.
- [ ] This will stop the CSS being loaded for old browsers that do not support the techniques in use.
- [ ] This is part of a stylesheet-switching script to load different themes for the site.
- [ ] This will stop the CCS being loaded on slow data connections.

[Source: StackOverflow](https://stackoverflow.com/a/46750893)

1 comment on commit a74bf96

@asbillt
Copy link
Contributor

@asbillt asbillt commented on a74bf96 Nov 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You submitted the same thing I did on Sunday. How do I get mine committed as well?

Please sign in to comment.