var galaxies = {"Milky Way", "Whirlpool", "Andromeda"};
Q27. Which description correctly describes the initial values of flex items if you have applied display: flex to their parent?
Items display in a row, lined up at the start, and do not stretch to fill the container
Items display in a column, lined up at the start, and do not stretch to fill the container
Items stay in a column until you add some flex properties.
Items displayed in a row, lined up at the start and stretched to fill the container
Q28. Which line of code, if applied to all flex items in a flex container, would cause each flex item to take up an equal share of the total width of the container? For example, if there are four items, they would get 25% of each.
flex: 1 0 0;
flex: initial;
flex: 1 1 auto;
flex: 1 0 auto;
Q29. A video on your webpage does not display and the console shows an error about mixed content. What is happening?
The webpage is using a DOCTYPE, which renders it incapable of displayed video in addition to other web content.
Your browser does not support HTML5 video.
The video is from a source that cannot be displayed in your location for legal reasons.
The page is loaded via HTTPS, but the video is being served insecurely as HTTP and the browser is blocking it.
Q30. What will this loop print?
let max = 3;
for (i = 0; i > max; i++) {
document.write("skrt ");
}
skrt skrt skrt
skrt skrt
skrt skrt skrt skrt
nothing
Q31. You have placed an image in a directory named images and want to reference it from a page located at the root of your site. Which choice would correctly display the image on the page?
<img src="image.jpg">
<a href="images/image.jpg"></a>
<img src="images/image.jpg">
<img href="image.jpg">
Q32. Which choice is a correct use of the parseInt() function in Javascript that parses a string and returns an integer?
parseInt("six");
parse_int('6');
parseInt("6");
parseint("6");
Q33. How can you rewrite this function using arrow function syntax?
let product => (x,y) { <br /> x \* y; <br />}
let product = (x,y) => x\*y;
let product => x\*y;
let product = (x,y) -> x\*y;
Q34. Lighthouse is a tool for auditing your website. Which choice is not a category of report offered by Lighthouse?
performance
UX design
accessibility
SEO
Q35. In the context of this code, how would you describe user?
Q39. You have a set of images that are slightly different sizes and aspect ratios. You don't mind if you crop off some of the image, but you want each image to completely fill a square box without being distorted. Which property and value would achieve this?
object-fit: contain
object-fit: stretch
object-fit: all
object-fit: cover
Q40. what does the CSS selector a[href$="org"] select?
all <a> tags whose href attribute begins with "org"
all <a> tags whose href attribute equals "org"
all <a> tags whose href attribute ends with "org"
all <a> tags whose href attribute contains "org"
Q41. Which choice <em>is not a result</em> of invoking strict mode in JavaScript?
It eliminates some JavaScript silent errors by changing them to throw errors.
It prohibits some syntax likely to be defined in future versions of ECMAScript.
It forces the writing of valid HTML and CSS.
It fixes mistakes that make it difficult for JavaScript engines to perform optimizations.
Q45. _ moves an element completely out of the page's normal layout flow like it is sitting on its own separate layer. From there, you can fix it in a position relative to the edges of the page's <html> element (or its nearest positioned ancestor element).
position: absolute;An element with position: absolute; is positioned relative to the nearest positioned ancestor (instead of positioned relative to the viewport, like fixed). However; if an absolute positioned element has no positioned ancestors, it uses the document body, and moves along with page scrolling.
Q46. You have created a box that has a height set with CSS. Which line of CSS would add scroll bars if the content is taller than the box, but leave no visible scroll bars if the content fits into the box?
.box { overflow: scroll; }
.box { overflow: scroll-x; }
.box { overflow: auto; }
.box { overflow: none; }
Q47. Which array method should you apply to run a function for every item within an array, returning an array of all items for which the function is true?
every()
map()
forEach()
filter()
Q48. The image below has float: left applied. Text wraps the float on the right and bottom. How would you force the second paragraph to start underneath the float, leaving a gap after the preceding paragraph?
clear: left;When we use the float property, and we want the next element below (not on the 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?
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?
Q55. Your website uses CSS Grid Layout extensively, and a visitor who navigates using the keyboard tells you that they seem to jump erratically all over the screen when navigating. What is the most likely problem?
The visitor's browser does not have full support for CSS Grid Layout.
Items have been positioned in such a way that they are in a different order to the source.
The browser has a keyboard navigation bug.
You need to add the tabindex attribute to elements.?
Q65. CSS Logical Properties and Values now have wide-ranging support in browsers. If you wanted to use the logical version of width, which property name would you choose?
Q66. Which color value will create a background color that is semitransparent?
rgb(18, 138, 125)
#128a7d
rgba(18, 138, 125,.5)
hsl(174, 77%, 31%)
Q67. In a grid layout, which property will create gaps between the rows in the grid?
row-gap
rowgap
gutter
row-gutter
Q68. You are creating a responsive design, but when you view your site on a smaller screen, you notice that images are causing a horizontal scroll bar. How can you solve this problem without stretching any images out of shape?
Set object-fit: contain on the images.
Set max-width: 100% on the images.
Set width: 100% on the images.
Set resize: true on the images.
Q69. The CSS box model describes how the parts of a CSS box fit together and the size of the box. What is the actual width of the following box's visible part under the standard box model?
The browser will show no content until the web font loads.
The browser will ignore the web font.
The browser will ignore the web font in a situation where the user has indicated they are saving data.
The browser will load a system font while waiting for the web font to load.
Q80. What does the term "code splitting" mean with regard to JavasScript performance?
allowing the browser to ignore code that it believes will perform badly
splitting code into various bundles so that decisions can be made on loading priority
removing unused code from JavaScript files
only using code that is supported by the newest browsers, and serving the site without JavaScript to old browsers
Q81. The vertical-align property works only on certain elements, or on those that have a certain CSS applied. Which element by default will allow vertical-align to be used?
div
td
figure
p
Q82. Which attribute is used to add text to an image that will be displayed if the image does not load and read out to screen reader users?
title
data
src
alt
Q83.Which pseudo-class allows you to selectively show a focus ring on elements only if keyboard navigation is detected?