What is the path in this URL Codehs?


In this session, we will be showing you CodeHS web design answers for free since this is a vast topic:

CodeHS Web Design Answers – Getting Started

Before solving Web Design related problems let us answer a few basic definitions you must know:

Q. Who creates the look and feel of a website?
Ans: A web designer

Q. Who thinks about the best way to display information on the site?
Ans: A web designer

Q. Which of the following falls under the role of a web designer?
Ans: I, III, IV

Q. What is the Internet?
Ans: A philosophy of making information and knowledge open & accessible to everyone. A network of networks built on open agreed-upon protocol.

Q. Routing
Ans: The process of sending data between two computers on the internet. The data is sent through routers that determine the route.

Q. Packets
Ans: Units of data that are sent over the network.

Q. True or False: The majority of the world has access to the Internet.
Ans: False

Q. Which of the following is related to the issue of censorship on the Internet?
Ans: A government filters search results to limit access to information and suppress discussion amongst its citizens.

Q. What is a browser?
Ans: A program on your computer that allows you to visit websites.

Q. Which of the following are examples of browsers:
Ans: I, II, and III only

Q. Which of the following is not a concern that has come out of the widespread adoption of the Internet?
Ans: Selecting the correct browser to use for the sites you want to visit.

Q. Which of the following does not demonstrate a harmful consequence of increased anonymity on the Internet?
Ans: Users can avoid targeted discrimination in an online forum.

Q. What percentage of the world population has access to the Internet?
Ans: 40%

Q. Which of the following is a term that describes “a widely agreed-upon set of rules that standardize communication between machines”?
Ans: Protocol

Q. Which of the following is an example of a browser?
Ans: Firefox

Q. What machine listens for HTTP requests to come into a website’s domain?
Ans: A server

Q. What is the path of the URL www.twitter.com/codehs?
Ans: /codehs

Q. Which of the following is not a step required to view a web page?
Ans: The user types in their login credentials.

Q. True or False: As long as you cite your sources, you can put any image you find online on your website.
Ans: False

Q. Which of the following actions will help you avoid violation of copyright laws?
Ans: All of the above

Q. What does URL stand for?
Ans: Uniform Resource Locator

Q. All of the colors you see on a computer screen are the result of a mixture of the same three colors. What are those colors?
Ans: red, green, blue

Q. Which of the following best describes the difference between the domain and path of a URL?
Ans: The domain specifies where the browser’s request should be sent. The path specifies exactly what file is being requested.

Q. What is the domain of this URL: www.example.com/home.html
Ans: www.example.com

Q. True or False: In the case that two conflicting rules have the same order and specificity, the rule that is written first will be applied.
Ans: False

Q. True or False: If a selector’s display property is set to none, selected elements will still take up space on the page.
Ans: False

Q. Which of the following is not a property that can hide the visibility of an element?
Ans: hidden

Q. True or False: You will learn everything there is to know about HTML and CSS from CodeHS.
Ans: False

Q. Who might need to look something up in HTML/CSS documentation?
Ans: All of the above!

Q. The Inspector would be a useful tool for which of the following tasks?
Ans: Testing what small CSS changes will do to the site presentation.

Q. Open https://start.duckduckgo.com in a new window. You will need to refer to it to answer the following questions. Did you open https://start.duckduckgo.com in a new window or tab?

Ans: Yes

Q. Open the website for the Nelson Mandela Metropolitan Art Museum in a new tab (link below). http://www.artmuseum.co.za/ Did you open the website in a new window?

Ans: Yes

Q. True or False: You can only transition one property at a time.
Ans: False

Q. Which of the following would you use an IFrame for?
Ans: Embedding a map from Google Maps on your website.

Q. Why is it important to avoid repetitive code while creating a website?
Ans: All of the above

Q. Which of the following settings will not make an element invisible?
Ans: appearance: off

Q. True or False: Only CSS has online documentation because it is a more complex language than HTML.
Ans: False

Q. True or False: None of the changes you make in the Inspector will be saved.
Ans: True

Q. Which of the following defines border thickness so that the top and bottom borders are 10px thick and left and right borders are 5px thick?
Ans: border: 10px 5px 10px 5px

Q. True or False: If you are adding your own CSS sheet, make sure your CSS file comes before the Bootstrap CSS file.
Ans: False

Q. Fill in the blank: All site content needs to be inside a ________ div to make the content responsive.
Ans: .container

Q. True or False: The number of columns in a row depends on the device that the website is being viewed on.
Ans: False

Q. Which of the following is not part of the Design Cycle?
Ans: Educate

Q. What is the first step of the Design Cycle?
Ans: Gain empathy and understanding for the group you are designing for.

Q. Which of the following is not a strategy to help build empathy for your users?
Ans: Explain the correct solution to your user.

Q. Why is it important to maintain a beginner’s mindset while building empathy for your user?
Ans: It helps you avoid applying your own assumptions to a situation.

Q. What is the goal of the “define” step of the design cycle?
Ans: Use your findings from the empathy phase to come up with one specific problem that needs to be solved for your users.

Q. Which of the following does not need to be included in a POV statement?
Ans: Potential solutions

Q. Which of the following is NOT a good method for group brainstorm?
Ans: Shoot down ideas that aren’t considered good ideas.

Q. What is a prototype?
Ans: Anything physical that lets a user interact with your idea.

Q. Which of the following is NOT a good testing method?
Ans: Correct your user if they are using your prototype incorrectly.

Q. What is the second step of the design cycle after you develop empathy for your users?
Ans: Define a specific problem to solve.

CodeHS HTML Answers

Before solving HTML related problems let us answer a few basics that you must know:

Q. Who writes the HTML that brings the site to life?
Ans: A web developer

Q. What does HTML stand for?
Ans: Hyper Text Markup Language

Which of the following is a valid HTML tag?
Ans: <h1>

Q. Which of the following is an example of metadata about a webpage?
Ans: The title of the webpage

Q. What is the function of the <br> tag?
Ans: Create a line break on the resulting webpage

Q. Inspect the picture of the duck in the middle of the page. You should see that it is actually a link (<a>). What is this a tag’s class?

Ans: logo_homepage

Q. What kind of element has the ID search_form_input_homepage ?
Ans: <input> in the search bar

Q. What is the ID of the body tag?
Ans: pg-index

Q. Which of the following is the correct HTML code to create a hyperlink that displays and links to google.com?
Ans:
<a href=”https://google.com”>
Click Me
</a>

Q. Which of the following lines of HTML code will insert an image into a webpage?
Ans: <img src=”https://codehs.com/static/img/logo.png”>

Q. Which of the following HTML code snippets would produce the following web page: Apples Bananas Oranges
Ans:
<ul>
<li>Apples</li>
<li>Bananas</li>
<li>Oranges</li>
</ul>

Q. Which of the following tags defines a table row?
Ans: <tr>

Q. Which of the following tags defines a table header?
Ans: <th>

Q. Which of the following is the proper format for an HTML tag?
Ans: <h1>Content Affected by Tag</h1>

Q. What is generated from the following HTML code <h1>Hello</h1> <h3>Hello</h3> <h6>Hello</h6>
Ans:
Hello (big)
Hello (medium)
Hello (small)

Q. Inspect the menu item that says “The Museum” at the top of the page. What did this web developer use to create the navigation bar?
Ans: <ul>

Q. Use the inspector to inspect one of the exhibit tiles at the bottom of the page. What did this web developer use to create these tiles?
Ans: <table>

Q. Inspect the large picture in the middle of the page. What class does this element have?
Ans: header

Q. Open Calvin’s homepage in a new tab or window: http://calvin.codehs.me/ Have you opened http://calvin.codehs.me/ in a new tab or window?
Ans: Yes

Q. Inspect the body. What is the background color?
Ans: #8CF5F5

Q. What is the value for the attribute display for the <h1> tag that says “Welcome to Calvin’s Homepage”?
Ans: Block

Q. Inspect the picture of Karel, which is the first picture on the page. When you look at its style, you should see it has the width:250px Click on 250px. Change it to 800px. What happens?

Ans: The picture gets bigger.

Q. Which of the following is not a part of the box model?
Ans: background

Q. Which of the following HTML code snippets will generate the following table?
Ans:
<table border=”1″>
<tr>
<th>Name</th>
<th>Score</th>
</tr>
<tr>
<td>Karel</td>
<td>32</td>
</tr>
</table>

Q. Which of the following HTML code snippets is the proper way to set the background color of a <h1> tag to be blue?
Ans: <h1 style=”background-color:blue;”>Hello</h1>

Q. Which of the following is a valid color in HTML?
Ans: All of the above

Q. Assume you have two files for your website, and these files exist in the same folder: index.html about.html Which of the following is the proper way to link to the about.html page from the index.html page?

Ans: <a href=”about.html”>About This Site</a>

Q. What are IFrames?
Ans: HTML pages embedded inside of other HTML pages

Q. True or False: It is possible to embed any website inside IFrames.
Ans: False

Q. You are trying to apply the same style to several different elements in a block, with line breaks before and after. Which tag should you use?
Ans: <div>

Q. What is the function of the div tag?
Ans: All of the above

Q. Which of the following selects all elements with the class footer that are inside of divs?
Ans:
div .footer {

}

Q. Which of the following selects all tags that are immediate children of div tags?
Ans:
div > a {

}

Q. Which of the following correctly uses div to style multiple elements the same way?
Ans:
<div class=”intro”>
<h2>Welcome</h2>
<p>Hi, welcome to my page.</p>
</div>

Q. What is the difference between <span> and <div>?
Ans: <span> is used to group and style inline elements, while <div> creates a line break.

Which of the following selects all p tags with the class alert and makes them red?
Ans:
p.alert {
color: red;
}

Q. How can I select all h1 tags that are immediate children of div tags?
Ans:
div > h1 {

}

Q. What is the reasoning behind the Don’t Repeat Yourself principle?
Ans: Repeated code makes it harder to read and edit

Q. What are some ways to cut down on repetitive code in your website?
Ans: All of the above

Q. Which of the following will turn the h1 tag blue as the mouse hovers over it?
Ans:
h1:hover {
color: blue;
}

Q. Which of the following will insert an exclamation point after every h2 element?
Ans:
h2::after {
content: “!”;
}

Q. Which of the following will result in this button grouping? (left, middle, right)
Ans:
<div class=”btn-group-vertical”>
<a href=”#” class=”btn btn-default”>Left</a>
<a href=”#” class=”btn btn-default”>Middle</a>
<a href=”#” class=”btn btn-default”>Right</a>
</div>

Q. Which of the following classifies as metadata about a webpage?
Ans: The title of the webpage

Q. An image is hosted at https://upload.wikimedia.org/wikipedia/commons/6/62/Big_and_little_dog.jpg Which of the following is the proper HTML code to display this image on your webpage?
Ans: <img src=”https://upload.wikimedia.org/wikipedia/commons/6/62/Big_and_little_dog.jpg”>

Q. What is the result of the following HTML code: <ol><li>Bread</li> <li>Milk</li> <li>Eggs</li> </ol>
Ans:
1. Bread
2. Milk
3. Eggs

Q. Suppose you have written a web page using HTML and it is hosted at the URL yourdomain.com/home.html Which of the following statements is true about which devices can view your website?
Ans: Any browser on any device will be able to view your webpage, because all browsers and devices on the Internet agree to use the same protocols for sending, receiving, and viewing webpages.

CodeHS CSS Answers

Before solving CSS related problems let us answer a few basics that you must know:

Q. Who writes the CSS that brings the site to life?
Ans: A web developer

Q. Why do we use CSS?
Ans: All of the above

Q. What is the function of the Cascade in CSS?
Ans: The Cascade determines which CSS rules will be applied when multiple rules for an item are contradictory.

Q. In what order does the Cascade look at factors to determine which CSS rule to follow?
Ans: Importance, Specificity, Order

Q. What is the font style of the span with the ID CSS? It can be found in the second paragraph, around the word “CSS”.
Ans: Italic

Q. True or False: An image can have more than one CSS filter.
Ans: True

Q. Which of the following is a valid CSS rule?
Ans:
h1 {
color: blue;
}

Q. CSS Combinators
Ans: It is used to combine two simple selectors to make a more specific selector.

Q. Which of the following is a valid CSS rule?
Ans:
h1 {
color: blue;
}

Q. Options for Selecting Elements with CSS
Ans: tag, class, and ID

Q. The Box Model
Ans: A CSS tool that allows us to space out elements on a page.

Q. EXAMPLE Box Model code
Ans:
div {
width: 20px;
height: 40px;
padding: 5px 10px 20px 30px;
border: 3px solid green;
margin: 5px 10px 5px 10px;

Q. Filter Property
Ans: Adds filters to images on a webpage.

Q. CSS Filter Property Examples
Ans: Greyscale, Sepia, Contrast, Brightness, Blur, Invert, Opacity, and Saturate

Q. CSS Pseudo-Classes
Ans: It allows you to select elements that are in a certain state, such as when a mouse is hovering over the element.

Q. Example Pseudo-Class
Ans:
p:hover{
color:red;
}

Q. Pseudo-Class Format
Ans:
selector:pseudo-class{
property:value;
}

Q. CSS Pseudo-Element
Ans:  It allows you to style specific parts of an element’s content.

Q. Example CSS Pseudo-Element
Ans:
p::first-letter{
color:DarkGreen;
font-size:24px;
}

Q. CSS Pseudo-Element Format
Ans:
selector::pseudo-element{
property: value;
}

Q. CSS Visibility Property
Ans: It allows us to hide and show elements.

Q. CSS Opacity Property
Ans: lets us specify how transparent an element is.

Q. Opacity Property- 0
Ans: Fully transparent, invisible

Q. Opacity Property- 1
Ans: Fully opaque, fully visible

Q. CSS Display Property
Ans: Specifies how an element is displayed.

Q. Example Display Property Values
Ans: None, inline, block

Q. Display Property-None
Ans: Element is not displayed and it takes up no space.

Q. Display Property-Inline
Ans: Element displayed in the same line as surrounding elements.

Q. Display Property-Block
Ans:  Element displayed as its own block that takes up as much space as possible, and creates space before and after itself.

Q. CSS Animation Properties
Ans: Allows us to animate style changes over time.

Q. EXAMPLE CSS Animation code
Ans:
@keyframes my-animation {
from {background-color: red;}
to {background-color: green:}
}
p{
animation: my-animation 2s forwards;
}

Q. CSS Interactions
Ans: Allows user to change styles on elements by hovering or clicking on them.

Q. Examples CSS interactions(hover)
Ans:
img{
width: 100px;
height: 100px;
transition: width 2s;
}
img:hover {
width: 200px;
height: 200px;
}

Q. EXAMPLE CSS Interactions(click)
Ans:
img{
width: 100px;
height: 100px;
transition: width 2s, height 2s;
}
img:active {
width: 200px;
height: 200px;
}

Q. img { width: 100px; height: 100px; transition: width 2s, height 2s; } img:hover { width: 200px; height: 200px; } What would be the resulting difference if the line transition: width 2s, height 2s; was removed from the first CSS rule?

Ans: There would no longer be a smooth transition for the image:hover rule.

CodeHS Advanced HTML & CSS Answers

Let us now solve very advanced HTML & CSS related problems that you must know:

Q. Define index.html
Ans: Usually the default landing page (or home page) for a website.

Q. Example code to Link HTML file to another HTML file
Ans: <a href=”about.html”>About</a>

Q. IFrame
Ans: HTML pages embedded inside of other HTML pages.

Q. Examples of IFrames
Ans: maps, videos, social media feeds

Q. Explain <div> tag
Ans:
– used to define a section of an HTML page
– groups a block of elements together to format them with CSS

Q. <div> Example
Ans:
<div class=”intro”>
<h2>Welcome</h2>
<p>Hi, welcome to my page.</p>
</div>

Q.  Explain <span> tag
Ans: It is used to group together inline elements on the HTML page to add style to those elements.

Q. The difference between <span> and <div>
Ans: <span> is used to group and style inline elements, while <div> creates a line break

Q. <span> Example
Ans: <li><span class=”feat-title”> Lifespan: </span> 5 years old</li>

Q. Descendant Selector (space)
Ans: It is used to select everything inside of an element.

Q. Child Selector (>)
Ans: It is used to select everything one level inside of an element.

Q. Parent
Ans: The element directly above an element.

Q. Sibling Selector (+)
Ans: It is used to select all elements that share the same parent (immediate children of an element).

Q. The Don’t Repeat Yourself Principle
Ans:  The idea that we shouldn’t have repeated code because it makes it harder to read and edit.

Q. Ways to Reduce Repeated Code
Ans:
-> Group together multiple selectors with commas.
-> Strategically plan ahead to make sure the site is coded concisely.
-> Use a div to style multiple elements.

Q. Which of the following code snippets will select all <img> tags on a page and give them a height of 200 pixels?
Ans:
img {
height: 200px;
}

Q. Which of the following code snippets will select all HTML elements with the class “alert” and set their color to be red?
Ans:
.alert {
color: red;
}

Q. Which of the following CSS rules will select the HTML element with the id logo and set the font size for that element to 60 pixels?
Ans:
#logo {
font-size: 60px;
}

Q. CSS rules have a selector that defines which HTML elements the rule applies to. We’ve learned about the following CSS Selectors: Select by tag name Select by class name Select by id name Which of the following ranks the selectors from highest precedence to lowest precedence?
Ans: Select by id name, select by class name, select by tag name

Q. Which of the following statements are true about styling your web pages with CSS: I. Styling with CSS is more scalable than using style= on each HTML tag that you want to style II. You can create styles with CSS that are not possible using style= on an HTML tag
Ans: I only

Q. Suppose you have written a web page using HTML and CSS and it is hosted at the URL yourdomain.com/home.html Which of the following statements is true about which devices can view your website?
Ans: Any browser on any device will be able to view your webpage, because all browsers and devices on the Internet agree to use the same protocols for sending, receiving, and viewing webpages.

Q. Assume you have two files for your website, and these files exist in the same folder: about.html style.css Which of the following is the proper way to apply the CSS code inside style.css to the about.html file?

Ans:


Inside about.html:
<head>
<link rel=”stylesheet” type=”text/css” href=”style.css”>
</head>

CodeHS HTML & CSS Solved Problems

Finally, let us discuss few answers for the unsolved problems which you can find below:

Q. Which of the following will turn the first letter of all p elements blue?
Ans:
p::first-letter {
color: blue;
}

Q. Which of the following selects images as the mouse hovers over them and sets their size to 350px by 350px?
Ans:
img:hover {
width: 350px;
height: 350px;
}

Q. For the given div, what is the size of the right padding? div { width: 10px; height: 10px; padding: 15px 10px 5px 20px; }

Ans: 10px

Q. Which of the following applies a grayscale filter to all images?
Ans:
img {
filter: grayscale(100%);
}

Q. Which of the following defines an animation increase-font that increases the font size from 5px to 20px?
Ans:
@keyframes increase-font {
from {font-size: 5px;}
to {font-size: 20px;}
}

Q. Which of the following applies an animation named grayscaleFilter over 10 seconds to every img tag?
Ans:
img {
animation: grayscaleFilter 10s;
}

Q. Which of the following applies the invert filter to all images with the class “inverted”?
Ans:
img.inverted {
filter: invert(100%);
}

Q. Which of the following defines an animation change color that changes the font color from green to red?
Ans:
@keyframes change-color {
from {color: green;}
to {color: red;}
}

Q. Which of the following will result in a smooth transition from green to red as the mouse clicks on h1 tags?
Ans:
h1 {
color: green;
transition: color 2s;
}
h1:active {
color: red;
}

Q. Suppose you are making a music streaming website and you want to make a page that displays a user’s music library. Which of the following is the proper HTML code to create the following table:
Ans:
<table border=”1″>
<tr>
<th>Title</th>
<th>Artist</th>
<th>Length</th>
</tr>
<tr>
<td>CD Jam</td>
<td>Rooney Pitchford</td>
<td>3:55</td>
</tr>
<tr>
<td>Memory</td>
<td>Tom Misch</td>
<td>5:41</td>
</tr>
</table>

Q. Suppose you have the following CSS rules: p { color: green; } .fire { color: red; } #title { color: blue; } What font color will the following HTML element have after being styled by the given CSS: <h1 class=”fire”>Welcome!</h1>

Ans: Red

Q. Suppose you have the following CSS rules: p { color: green; } .fire { color: red; } #title { color: blue; } What font color will the following HTML element have after being styled by the given CSS: <p class=”title”>My First Paragraph</p>

Ans: Green

Q. Suppose you have the following CSS rules: p { color: green; } .fire { color: red; } #title { color: blue; } What font color will the following HTML element have after being styled by the given CSS: <p class=”fire” id=”title”>Hello World!</p>

Ans: Blue

Q. Assume you have two files for your website, and these files exist in the same folder: home.html style.css Which of the following is the proper way to apply the CSS code inside style.css to the home.html file?

Ans:


Inside home.html:
<head>
<link rel=”stylesheet” type=”text/css” href=”style.css”>
</head>

CodeHS Bootstrap Answers

Before solving Bootstrap related problems let us answer a few basic definitions & information you must know:

Q. Define Bootstrap
Ans: It provides several premade HTML components & CSS classes that can be used to make your web pages look clean & professional on every device.

Q. What is the difference between .container and .container-fluid?
Ans:
-> .container-fluid constantly updates to fit the width of the window,
-> while .container will update occasionally as the window is resized.

Q. True or False: If you use Bootstrap’s framework for your site, you can’t add your own CSS rules.
Ans: False

Q. Yes or No. It is impossible to have more than one jumbotron on a given page.
Ans: No

Q. Which of the following creates a responsive jumbotron on your website?
Ans:
<div class=”container”>
<div class=”jumbotron”>
<h1>This text will be in a jumbotron</h>
</div>
</div>

Q. How many columns fit in a single row in the Bootstrap grid system?
Ans: 12

Q. <div class=”row”> <div class=”col-sm-6″>1</div> <div class=”col-sm-6″>2</div> </div> What is the smallest device that will display these columns side by side?

Ans: Tablet

Q. What is the correct way to add a default-styled button to a <a> tag?
Ans: <a href=”#” class=”btn btn-default”>Button</a>

Q. Which of the following will correctly display a page header with subtext?
Ans:
<div class=”page-header”>
<h1>
This is the header <small> This is the subtext </small>
</h1>
</div>

Q. Which of the following correctly creates a thumbnail of the CodeHS logo that links to https://codehs.com?
Ans:
<a href=”https://codehs.com/” class=”thumbnail”>
<img src=”codehs_logo.jpg” alt=”CodeHS Logo”>
</a>

Q. Which of the following creates a table that is responsive to screens of different sizes?
Ans:
<div class=”table-responsive”>
<table class=”table”>

</table>
</div>

Q. Which page should the following nav-tabs be added to? <ul class=”nav nav-tabs”> <li><a href=”home.html”>Home</a></li> <li class=”active”><a href=”profile.html”>Profile</a></li> <li><a href=”messages.html”>Messages</a></li> </ul>

Ans: profile.html

Q. Fill in the Blank: Contents of a navbar need to go inside a _______ div.
Ans: .container

Q. Why might you decide to use a dropdown menu on your website? *To group options together in a way that makes sense *To have a simple interface without too many buttons *To save space and keep a clean website layout

Ans: All of the above

Q. True or False: It is not plagiarism to copy code from Bootstrap examples to your own website.
Ans: True

Q. If you are adding your own CSS sheet, make sure your CSS file comes _____________ the Bootstrap CSS file.
Ans: after

Q. All site content needs to be inside a ________ ____ to make the content responsive.
Ans: container div

Q. <div class=”row”> <div class=”col-sm-6″>1</div> <div class=”col-sm-6″>2</div> </div> What is the largest device that will display this row in stacked columns?

Ans: Smart Phone

Q. Which of the following is not a Bootstrap component covered in this unit?
Ans: Emojis

Q. Which of the following does not correctly create a navigation bar?
Ans:
<nav class=”navbar-nav navbar-right”>
<div class=”container”>

</div>
</nav>

Q. Fill in the blank: ________ are a great way to pack more options into a navigation bar while keeping the interface clean and simple.
Ans: Dropdown menus

Q. Yes or No. Bootstrap example websites can be used as a starter template for your own projects.
Ans: Yes

Q. True or False: Only people who are new to Bootstrap need to look at the documentation.
Ans: False

Q. True or False: Bootstrap example websites can be used as a starter template for your own projects.
Ans: True

About CodeHS Web Design

What is the path in this URL Codehs?

CodeHS Web design is an online course conducted by its educators that includes 70+ lessons, 55+ videos, 145+ exercises, 55+ offline Handouts & about 17+ challenges to participate.

>> Check CodeHS Answers For Other Hot Topics Here <<

That’s it…

We hope you are able to find CodeHS Web Design answers key by browsing with us. If it helps please share it with your friends. Thank you!