Skip to content

Commit

Permalink
Provide solutions to recently added questions (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
rradfar authored Jan 3, 2021
1 parent 9199293 commit 67e388c
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 78 deletions.
166 changes: 88 additions & 78 deletions html/html-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ On July 21, 1969, Neil Armstrong said, "One small step for man, one giant leap f
</p>
```

#### Q21. What should fill the blank in this HTML code?
#### Q21. What should fill the blank in this HTML code?

```html
<a href="https://es.yahoo.com/" hreflang="____" target="_blank">Visita Yahoo</a>
Expand Down Expand Up @@ -550,15 +550,7 @@ From [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr): The HT

#### Q35. What is the correctly nested markup for this list?

```markdown
-Office
--Staple
--Paper
-Groceries
--Milk
```
[picture](https://cdn.lynda.com/question/5d07ce7b498ef292ca309a14/5d07ce7b498ef292ca309a14-1560793406126)

![Sample list](images/ss-6.png?raw=true)

- [ ]

Expand Down Expand Up @@ -939,8 +931,8 @@ From [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr): The HT

- [ ] It establishes the language for the website—in this case, English.
- [ ] It establishes the language and dialect for the website—in this case, British English.
- [ ] It establishes the language and dialect for the paragraph—in this case, British English.
- [x] It establishes the language for the paragraph—in this case, English.
- [x] It establishes the language and dialect for the paragraph—in this case, British English.
- [ ] It establishes the language for the paragraph—in this case, English.

#### Q54. Which image formats can be displayed by all web browsers?

Expand All @@ -955,91 +947,109 @@ From [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr): The HT
<base href="http://www.linkedin.com/dir/">
```

- [ ] http://www.linkedin.com/dir/page.html
- [ ] page.html
- [ ] http://www.linkedin.com/page.html
- [ ] dir/page.html
- [x] `http://www.linkedin.com/dir/page.html`
- [ ] `page.html`
- [ ] `http://www.linkedin.com/page.html`
- [ ] `dir/page.html`

#### Q56. What is the correct way to include a stylesheet named **style.css** in the **<head>** of your document?
#### Q56. What is the correct way to include a stylesheet named **style.css** in the `<head>` of your document?

- [ ] `<style link="style.css">`
- [x] `<link rel="stylesheet" href="style.css">`
- [ ] `<style src="style.css"></style>`
- [ ] `<link style="style.css">`

- [ ] <style link="style.css">
- [ ] <link rel="stylesheet" href="style.css">
- [ ] <style src="style.css"></style>
- [ ] <link style="style.css">

#### Q57. You want to have single spacing in between some lines, like in a poem or an address. Which approach should you use?

- [ ] Wrap the text in a box that is the right width so everything wraps correctly. Set the box width with CSS.
- [ ] Separate lines with a '<p>', then use CSS to make single spacing.
- [ ] Use the '<pre>' tag to make the line spacing look exactly like you want.
- [ ] Separate the lines with the '<br>' tag.
#### Q58.What does the <wbr> tag do?
- [x] Separate lines with a `<p>`, then use CSS to make single spacing.
- [ ] Use the `<pre>` tag to make the line spacing look exactly like you want.
- [ ] Separate the lines with the `<br>` tag.

#### Q58.What does the `<wbr>` tag do?

- [ ] It requires the browser to wrap the current line at that point.
- [ ] It breaks a word into two pieces, using a hyphen to connect the words.
- [ ] It formats a sentence to be easily breakable.
- [ ] It presents an opportunity for a break in a very long word, if needed for proper page display.

#### Q59. Review the code below. How do you include subnavigation for Link 2 that includes a link?
```html
<nav><ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
</ul></nav>
```
- [ ]
<nav><ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<ul>
<li><a href="#">Link 2a</a></li>
</ul>
<li><a href="#">Link 3</a></li>
</ul></nav>
- [x] It presents an opportunity for a break in a very long word, if needed for proper page display.

#### Q59. Review the code below. How do you include subnavigation for Link 2 that includes a link?

<ul>
<li><!a href="#">Link 1</a></li>
<li><!a href="#">Link 2</a>
<ul>
<li><!a href="#">Link 2a</a></li>
</ul>
</li>
<li><!a href="#">Link 3</a></li>
</ul>

- [ ]
<nav><ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a>
<ul>
<li><a href="#">Link 2a</a></li>
</ul></li>
<li><a href="#">Link 3</a></li>
</ul></nav>

```html
<nav><ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<ul>
<li><a href="#">Link 2a</a></li>
</ul>
<li><a href="#">Link 3</a></li>
</ul></nav>
```

- [x]

```html
<nav><ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a>
<ul>
<li><a href="#">Link 2a</a></li>
</ul>
</li>
<li><a href="#">Link 3</a></li>
</ul></nav>
```

- [ ]
<ul><nav>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a>
<ul><nav>
<li><a href="#">Link 2a</a></li>
</nav></ul></li>
<li><a href="#">Link 3</a></li>
</nav></ul>

```html
<ul><nav>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a>
<ul><nav>
<li><a href="#">Link 2a</a></li>
</nav></ul>
</li>
<li><a href="#">Link 3</a></li>
</nav></ul>
```

- [ ]
<nav><ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<nav><ul>
<li><a href="#">Link 2a</a></li>
</ul></nav>
<li><a href="#">Link 3</a></li>
</ul></nav>


```html
<nav><ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<nav><ul>
<li><a href="#">Link 2a</a></li>
</ul></nav>
<li><a href="#">Link 3</a></li>
</ul></nav>
```

#### Q60. What is the correct way to code a comment in HTML?

- [ ] //this is a comment
- [ ] /* this is a comment */
- [ ] <! this is a comment ->
- [ ] <!-- this is a comment -->
- [ ] `//this is a comment`
- [ ] `/* this is a comment */`
- [ ] `<! this is a comment ->`
- [x] `<!-- this is a comment -->`

#### Q61. Which statement is false?
#### Q61. Which statement is **false**?

- [ ] Inline elements can be nested inside inline elements.
- [ ] Block elements can be nested inside block elements.
- [ ] Inline elements can be nested inside block elements.
- [ ] Block elements can be nested inside inline elements.
- [x] Block elements can be nested inside inline elements.

Binary file added html/images/ss-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 67e388c

Please sign in to comment.