CSS LinkedIn Skill Assessment Answer

Rate this post

Here, We see CSS LinkedIn Skill Assessment Answers. This assessment test consists 15-20 MCQs to demonstrate your knowledge in your selected skills. MCQs comes from different topics – CSS Display Styles, CSS Element Selectors, CSS Functions and Rules, CSS Page Layout, CSS Syntax and Semantics.

Table of Contents

Q1. In the following example, which selector has the highest specificity ranking for selecting the anchor link element?

ul li a
a
.example a
div a
  1. .example a✔️
  2. div a
  3. a
  4. ul li a

Q2. Using an attribute selector, how would you select an <a> element with a “title” attribute?

  1. a[title]{…}✔️
  2. a > title {…}
  3. a.title {…}
  4. a=title {…}

Q3. CSS grid and flexbox are now becoming a more popular way to create page layouts. However, floats are still commonly used, especially when working with an older code base, or it you need to support older browser version. What are two valid techniques used to clear floats?

  1. Use the “clearfix hack” on the floated element and add a float to the parent element.
  2. Use the overflow property on the floated element or the “clearfix hack” on either the floated or parent element.
  3. Use the “clearfix hack” on the floated element or the overflow property on the parent element.
  4. Use the “clearfix hack” on the parent element or use the overflow property with a value other than “visible.”✔️

Q4. What element(s) do the following selectors match to?

1) .nav {...} 2) nav {...} 3) #nav {...}

  1. A
1. An element with an ID of "nav"
2. A nav element
3. An element with a class of "nav"
  1. B
They all target the same nav element.
  1. C✔️
1. An element with an class of "nav"
2. A nav element
3. An element with a id of "nav"
  1. D
1. An element with an class of "nav"
2. A nav element
3. An div with a id of "nav"

Q5. When adding transparency styles, what is the difference between using the opacity property versus the background property with an rgba() value?

  1. Opacity specifies the level of transparency of the child elements. Background with an rgba() value applies transparency to the background color only.
  2. Opacity applies transparency to the background color only. Background with an rgba() value specifies the level of transparency of an element, as a whole, including its content.
  3. Opacity specifies the level of transparency of an element, including its content. Background with an rgba() value applies transparency to the background color only.✔️
  4. Opacity applies transparency to the parent and child elements. Background with an rgba() value specifies the level of transparency of the parent element only.

Q6. What is true of block and inline elements? (Alternative: Which statement about block and inline elements is true?)

  1. By default, block elements are the same height and width as the content container between their tags; inline elements span the entire width of its container.
  2. By default, block elements span the entire width of its container; inline elements are the same height and width as the content contained between their tags.✔️
  3. <nav> element is an example of an inline element. <header> is an example of a block element.
  4. <span> is an example of a block element. <div> is an example of an inline element.

Q7. CSS grid introduced a new length unit, fr, to create flexible grid tracks. Referring to the code sample below, what will the widths of the three columns be?

.grid {
  display: grid;
  width: 500px;
  grid-template-columns: 50px 1fr 2fr;
}
  1. The first column will have a width of 50px. The second column will be 50px wide and the third column will be 100px wide.
  2. The first column will have a width of 50px. The second column will be 150px wide and the third column will be 300px wide.✔️
  3. The first column will have a width of 50px. The second column will be 300px wide and the third column will be 150px wide.
  4. The first column will have a width of 50px. The second column will be 500px wide and the third column will be 1000px wide.

Q8. What is the line-height property primarily used for?

  1. to control the height of the space between two lines of content✔️
  2. to control the height of the space between heading elements
  3. to control the height of the character size
  4. to control the width of the space between characters

Q9. Three of these choices are true about class selectors. Which is NOT true?

  1. Multiple classes can be used within the same element.
  2. The same class can be used multiple times per page.
  3. Class selectors with a leading period
  4. Classes can be used multiple times per page but not within the same element.✔️

Q10. There are many properties that can be used to align elements and create page layouts such as float, position, flexbox and grid. Of these four properties, which one should be used to align a global navigation bar which stays fixed at the top of the page?

  1. position✔️
  2. flexbox
  3. grid
  4. float

Q11. In the shorthand example below, which individual background properties are represented?

background: blue url(image.jpg) no-repeat scroll 0px 0px;

  1. A✔️
background-color: blue;
background-image: url(image.jpg);
background-repeat: no-repeat;
background-attachment: scroll;
background-position: 0px 0px;
  1. B
background-color: blue;
background-img: url(image.jpg);
background-position: no-repeat;
background-scroll: scroll;
background-size: 0px 0px;
  1. C
background-color: blue;
background-src: url(image.jpg);
background-repeat: no-repeat;
background-wrap: scroll;
background-position: 0px 0px;
  1. D
background-color: blue;
background-src: url(image.jpg);
background-repeat: no-repeat;
background-scroll: scroll;
background-position: 0px 0px;

Q12. In the following example, according to cascading and specificity rules, what color will the link be?

.example {
  color: yellow;
}
ul li a {
  color: blue;
}
ul a {
  color: green;
}
a {
  color: red;
}
<ul>
  <li><a href="#" class="example">link</a></li>
  <li>list item</li>
  <li>list item</li>
</ul>
  1. green
  2. yellow✔️
  3. blue
  4. red

Q13. When elements overlap, they are ordered on the z-axis (i.e., which element covers another). The z-index property can be used to specify the z-order of overlapping elements. Which set of statements about the z-index property are true?

  1. Larger z-index values appear on top of elements with a lower z-index value. Negative and positive numbers can be used. z-index can only be used on positioned elements.✔️
  2. Smaller z-index values appear on top of elements with a larger z-index value. Negative and positive numbers can be used. z-index must also be used with positioned elements.
  3. Larger z-index values appear on top of elements with a lower z-index value. Only positive numbers can be used. z-index must also be used with positioned elements.
  4. Smaller z-index values appear on top of elements with a larger z-index value. Negative and positive numbers can be used. z-index can be used with or without positioned elements.

Q14. What is the difference between the following line-height settings?

line-height: 20px
line-height: 2
  1. The value of 20px will set the line-height to 20px. The value of 2 will set the line-height to twice the size of the corresponding font-size value.✔️
  2. The value of 20px will set the line-height to 20px. The value of 2 is not valid.
  3. The value of 20px will set the line-height to 20px. The value of 2 will default to a value of 2px.
  4. The value of 20px will set the line-height to 20px. The value of 2 will set the line-height to 20% of the corresponding font-size value.

Q15. In the following example, what color will paragraph one and paragraph two be? (Alternative: In this example, what color will paragraphs one and two be?)

<section>
  <p>paragraph one</p>
</section>

<p>paragraph two</p>
section p {
  color: red;
}
section + p {
  color: blue;
}
  1. Paragraph one will be blue, paragraph two will be red.
  2. Both paragraphs will be blue.
  3. Paragraphs one will be red, paragraph two will be blue.✔️
  4. Both paragraphs will be red.

Q16.What are three valid ways of adding CSS to an HTML page?

  1. A
1. External; CSS is written in a separate file.
2. Inline; CSS is added to the <head> of the HTML page.
3. Internal; CSS is included within the HTML tags.
  1. B
1. External; CSS is written in a separate file and is linked within the <header> element of the HTML file.
2. Inline; CSS is added to the HTML tag.
3. Internal; CSS is included within the <header> element of the HTML file.
  1. C
1. External; CSS is written in a separate file and is linked within the <head> element of the HTML file.
2. Internal; CSS is included within the <header> element of the HTML file.
3. Inline; CSS is added to the HTML tag.
  1. D✔️
1. External; CSS is written in a separate file and is linked within the <head> element of the HTML file .
2. Inline; CSS is added to the HTML tag.
3. Internal; CSS is included within the <head> element of the HTML file.

Q17. Which of the following is true of the SVG image format? (Alternative: Which statement about the SVG image format is true?)

  1. CSS can be applied to SVGs but JavaScript cannot be.
  2. SVGs work best for creating 3D graphics.
  3. SVGs can be created as a vector graphic or coded using SVG specific elements such as <svg>, <line>, and <ellipse>.✔️
  4. SVGs are a HAML-based markup language for creating vector graphics.

Q18. In the example below, when will the color pink be applied to the anchor element?

a:active {
  color: pink;
}
  1. The color of the link will display as pink after its been clicked or if the mouse is hovering over the link.
  2. The color of the link will display as pink on mouse hover.
  3. The color of the link will display as pink while the link is being clicked but before the mouse click is released.✔️
  4. The color of the link will display as pink before it has been clicked.

Q19. To change the color of an SVG using CSS, which property is used?

  1. Use background-fill to set the color inside the object and stroke or border to set the color of the border.
  2. The color cannot be changed with CSS.
  3. Use fill or background to set the color inside the object and stroke to set the color of the border.
  4. Use fill to set the color inside the object and stroke to set the color of the border.✔️

Q20. When using position: fixed, what will the element always be positioned relative to?

  1. the closest element with position: relative
  2. the viewport✔️
  3. the parent element
  4. the wrapper element

Q21. By default, a background image will repeat _

  1. only if the background-repeat property is set to repeat
  2. indefinitely, vertically, and horizontally✔️
  3. indefinitely on the horizontal axis only
  4. once, on the x and y axis

Q22. When using media queries, media types are used to target a device category. Which choice lists current valid media types?

  1. print, screen, aural
  2. print, screen, television
  3. print, screen, speech✔️
  4. print, speech, device

Q23. How would you make the first letter of every paragraph on the page red?

  1. p::first-letter { color: red; }✔️
  2. p:first-letter { color: red; }
  3. first-letter::p { color: red; }
  4. first-letter:p { color: red; }

Q24. In this example, what is the selector, property, and value?

p {
  color: #000000;
}
  1. A
"p" is the selector
"#000000" is the property
"color" is the value
  1. B✔️
"p" is the selector
"color" is the property
"#000000" is the value
  1. C
"color" is the selector
"#000000" is the property
"#p" is the value
  1. D
"color" is the selector
"p" is the property
"#000000" is the value

Q25. What is the rem unit based on?

  1. The rem unit is relative to the font-size of the p element.
  2. You have to set the value for the rem unit by writing a declaration such as rem { font-size: 1 Spx; }
  3. The rem unit is relative to the font-size of the containing (parent) element.
  4. The rem unit is relative to the font-size of the root element of the page.✔️

Q26.Which of these would give a block element rounded corners?

  1. corner-curve: 10px
  2. border-corner: 10px
  3. border-radius: 10px✔️
  4. corner-radius: 10px

Official doc:

Q27. In the following media query example, what conditions are being targeted?

@media (min-width: 1024px), screen and (orientation: landscape) { … }
  1. The rule will apply to a device that has either a width of 1024px or wider, or is a screen device in landscape mode.✔️
  2. The rule will apply to a device that has a width of 1024px or narrower and is a screen device in landscape mode.
  3. The rule will apply to a device that has a width of 1024px or wider and is a screen device in landscape mode.
  4. The rule will apply to a device that has a width of 1024px or narrower, or is a screen device in landscape mode.

Q28. CSS transform properties are used to change the shape and position of the selected objects. The transform-origin property specifies the location of the element’s transformation origin. By default, what is the location of the origin?

  1. the top left corner of the element✔️
  2. the center of the element
  3. the top right corner of the element
  4. the bottom left of the element

Q29. Which of the following is not a valid color value?

  1. color: #000
  2. color: rgb(0,0,0)
  3. color: #000000
  4. color: 000000✔️

Q30. What is the vertical gap between the two elements below?

<div style="margin-bottom: 2rem;">Div 1</div>
<div style="margin-top: 2rem;">Div 2</div>
  1. 2rem✔️
  2. 32px
  3. 64px
  4. 4rem

Q31. When using the Flexbox method, what property and value is used to display flex items in a column?

  1. flex-flow: column; or flex-direction: column✔️
  2. flex-flow: column;
  3. flex-column: auto;
  4. flex-direction: column;

Q32. Which type of declaration will take precedence?

  1. any declarations in user-agent stylesheets
  2. important declarations in user stylesheets✔️
  3. normal declarations in author stylesheets
  4. important declarations in author stylesheets

Q33. The flex-direction property is used to specify the direction that flex items are displayed. What are the values used to specify the direction of the items in the following examples?

  1. Example 1: flex-direction: row; Example 2: flex-direction: row-reverse; Example 3: flex-direction: column; Example 4: flex-direction: column-reverse;✔️
  2. Example 1: flex-direction: row-reverse; Example 2: flex-direction: row; Example 3: flex-direction: column-reverse; Example 4: flex-direction: column;
  3. Example 1: flex-direction: row; Example 2: flex-direction: row-reverse; Example 3: flex-direction: column; Example 4: flex-direction: reverse-column;
  4. Example 1: flex-direction: column; Example 2: flex-direction: column-reverse; Example 3: flex-direction: row; Example 4: flex-direction: row-reverse;

Q34. There are two sibling combinators that can be used to select elements contained within the same parent element; the general sibling combinator (~) and the adjacent sibling combinator (+). Referring to example below, which elements will the styles be applied to?

h2 ~ p {
  color: blue;
}
h2 + p {
  background: beige;
}
<section>
  <p>paragraph 1</p>
  <h2>Heading</h2>
  <p>paragraph 2</p>
  <p>paragraph 3</p>
</section>
  1. Paragraphs 2 and 3 will be blue. The h2 and paragraph 2 will have a beige background.
  2. Paragraphs 2, and 3 will be blue, and paragraph 2 will have a beige background.✔️
  3. Paragraphs 2 and 3 will be blue. Paragraph 2 will have a beige background.
  4. Paragraph 2 will be blue. Paragraphs 2 and 3 will have a beige background.

Q35. When using flexbox, the “justify-content” property can be used to distribute the space between the flex items along the main axis. Which value should be used to evenly distribute the flex items within the container shown below?

  1. justify-content: space-around;✔️
  2. justify-content: center;
  3. justify-content: auto;
  4. justify-content: space-between;

Q36. There are many advantages to using icon fonts. What is one of those advantages?

  1. Icon fonts increase accessibility.
  2. Icon fonts can be used to replace custom fonts.
  3. Icon fonts can be styled with typography related properties such as font-size and color.✔️
  4. Icon fonts are also web safe fonts.

Q37. What is the difference between display:none and visibility:hidden?

  1. Both will hide the element on the page, but display:none has greater browser support. visibility:hidden is a new property and does not have the best browser support
  2. display:none hides the elements but maintains the space it previously occupied. visibility:hidden will hide the element from view and remove it from the normal flow of the document
  3. display:none hides the element from view and removes it from the normal flow of the document. visibility:hidden will hide the element but maintains the space it previously occupied.✔️
  4. There is no difference; both will hide the element on the page

Q38. What selector and property would you use to scale an element to be 50% smaller on hover?

  1. element:hover {scale: 0.5;}
  2. element:hover {transform: scale(0.5);}✔️
  3. element:hover {scale: 50%;}
  4. element:hover {transform: scale(50%);}

Q39. Which statement regarding icon fonts is true?

  1. Icon fonts can be inserted only using JavaScript.
  2. Icon fonts are inserted as inline images.
  3. Icon fonts require browser extensions.
  4. Icon fonts can be styled with typography-related properties such as font-size and color.✔️

Q40. The values for the font-weight property can be keywords or numbers. For each numbered value below, what is the associated keyword?

font-weight: 400; font-weight: 700;

  1. bold; normal
  2. normal; bold✔️
  3. light; normal
  4. normal; bolder

Q41. If the width of the container is 500 pixels, what would the width of the three columns be in this layout?

.grid { display: grid; grid-template-columns: 50px 1fr 2fr; }

  1. 50px, 150px, 300px✔️
  2. 50px, 200px, 300px
  3. 50px, 100px, 200px
  4. 50px, 50px, 100px

Q42. Using the :nth-child pseudo class, what would be the most efficient way to style every third item in a list, no matter how many items are present, starting with item 2?

  1. A
li:nth-child(3 + 2n) {
  margin: 0 5 px;
}
  1. B✔️
li:nth-child(3n + 2) {
  margin: 0 5 px;
}
  1. C
li:nth-child(2),
li:nth-child(5),
li:nth-child(8) {
  margin: 0 5 px;
}
  1. D
li:nth-child(2n + 3) {
  margin: 0 5 px;
}

Q43. Which selector would select only internal links within the current page?

  1. a[href="#"] {...}
  2. a[href~="#"]
  3. a[href^="#"]
  4. a[href="#"]✔️

Q44. What is not true about class selectors?

  1. Only one class value can be assigned to an element.✔️
  2. An element can have multiple class value.
  3. Class selectors are marked with a leading period.
  4. More than one element can have the same class value.

Q45. What is the difference between the margin and padding properties?

  1. Margin adds space around and inside of an element; padding adds space only inside of an element.
  2. Margin adds space around an element; padding adds space inside of an element.✔️
  3. Margin adds a line around an element, padding adds space inside of an element.
  4. Margin adds space inside of an element, padding adds space around an element.

Q46. What is not a valid way of declaring a padding value of 10 pixels on the top and bottom, and 0 pixels on the left and right?

  1. padding: 10px 10px 0px 0px;
  2. padding: 10px 0px;
  3. padding: 10px 0;
  4. padding: 10px 0px 10px 0px;✔️

Q47. Is there an error in this code? If so, find the best description of the problem

@font-face {
  font-family: 'Avenir', sans-serif;
  src: url('avenir.woff2') format('woff2'), url('avenir.woff') format('woff');
}
  1. The font file formats are not supported in modern browsers.
  2. The src attribute requires a comma between the URL and format values.
  3. There are no errors in the example.
  4. The sans-serif inclusion is problematic.✔️

Q48. Which style places an element at a fixed location within its container?

  1. position: absolute;✔️
  2. display: flex;
  3. display: block;
  4. float: left;

Q49. The calc() CSS function is often used for calculating relative values. In the example below, what is the specified margin-left value?

.example {
  margin-left: calc(5% + 5px);
}
  1. The left margin value is equal to 5% of its parents element’s width plus 5px✔️
  2. The left margin value is equal to 5% of the viewport width plus 5px
  3. The left margin value is equal to 5% of the closest positioned element’s width plus 5px
  4. The left margin value is equal to 5% of the selected element’s width (.example) plus 5px

Q50. What is the CSS selector for an <a> tag containing the title attribute?

  1. a[title]✔️
  2. a > title
  3. a=title
  4. a.title

Q51. Which code would you use to absolutely position an element of the logo class?

  1. .logo { position: absolute; left: 100px; top: 150px; }✔️
  2. .logo { position: absolute; margin-left: 100px; margin-top: 150px; }
  3. .logo { position: absolute; padding-left: 100px; padding-top: 150px; }
  4. .logo { position: absolute; left-padding: 100px; top-padding: 150px; }

Q52. In this example, what color will Paragraph 1 be?

p:first-of-type {
  color: red;
}
p {
  color: blue;
}
.container {
  color: yellow;
}
p:first-child {
  color: green;
}
<div class="container">
  <h1>Heading</h1>
  <p>Paragraph1</p>
  <p>Paragraph2</p>
</div>
  1. blue
  2. green
  3. red✔️
  4. yellow

Q53. What is the ::placeholder pseudo-element used for?

  1. It is used to format the appearance of placeholder text within a form control.
  2. It specifies the default input text for a form control.
  3. It writes text content into a hyperlink tooltip.
  4. It writes text content into any page element.

Q54. Which statement is true of the single colon (:) or double colon (::) notations for pseudo-elements-for example, ::before and :before?

  1. All browsers support single and double colons for new and older pseudo-elements. So you can use either but it is convention to use single colons for consistency.
  2. In CSS3, the double colon notation (::) was introduced to create a consistency between pseudo-elements from pseudo-classes. For newer browsers, use the double colon notation. For IE8 and below, using single colon notation (:).
  3. Only the new CSS3 pseudo-elements require the double colon notation while the CSS2 pseudo-elements do not.
  4. In CSS3, the double colon notation (::) was introduced to differentiate pseudo-elements from pseudo-classes. However, modern browsers support both formats. Older browsers such as IE8 and below do not.✔️

Q55. Which choice is not valid value for the font-style property?

  1. normal
  2. italic
  3. none✔️
  4. oblique

Q56. When would you use the @font-face method?

  1. to set the font size of the text
  2. to load custom fonts into stylesheet✔️
  3. to change the name of the font declared in the font-family
  4. to set the color of the text

Q57. When elements within a container overlap, the z-index property can be used to indicate how those items are stacked on top of each other. Which set of statements is true?

  1. A✔️
1. Larger z-index values appear on top elements with a lower z-index value.
2. Negative and positive number can be used.
3. z-index can be used only on positioned elements.
  1. B
1. Smaller z-index values appear on top of elements with a larger z-index value.
2. Negative and positive numbers can be used.
3. z-index can be used with or without positioned elements.
  1. C
1. Smaller z-index values appear on top of elements with a larger z-index value.
2. Negative and positive number can be used.
3. z-index must also be used with positioned elements.
  1. D
1. Larger z-index values appear on top of elements with a lower z-index value.
2. Only positive number can be used.
3. z-index must also be used with positioned elements.

Q58. You have a large image that needs to fit into a 400 x 200 pixel area. What should you resize the image to if your users are using Retina displays?

  1. 2000 x 1400 pixels
  2. 200 x 100 pixels
  3. 800 x 400 pixels✔️
  4. 400 x 200 pixels

Q59. In Chrome’s Developer Tools view, where are the default styles listed?

  1. under the User Agent Stylesheet section on the right✔️
  2. in the third panel under the Layout tab
  3. under the HTML view on the left
  4. in the middle panel

Q60. While HTML controls document structure, CSS controls ___.

  1. semantic meaning
  2. content meaning
  3. document structure
  4. content appearance✔️

Q61. What is the recommended name you should give the folder that holds your project’s images?

  1. images✔️
  2. #images
  3. Images
  4. my images

Q62. What is an advantage of using inline CSS?

  1. It is easier to manage.
  2. It is easier to add multiple styles through it.✔️
  3. It can be used to quickly test local CSS overrides.
  4. It reduces conflict with other CSS definition methods.

Q63.Which W3C status code represents a CSS specification that is fully implemented by modern browsers?

  1. Proposed Recommendation
  2. Working Draft
  3. Recommendation✔️
  4. Candidate Recommendation

Q64. Are any of the following declarations invalid?

color: red; /* declaration A */
font-size: 1em; /* declaration B */
padding: 10px 0; /* declaration C */
  1. Declaration A is invalid.
  2. Declaration B is invalid.
  3. Declaration C is invalid.
  4. All declarations are valid.✔️

Q65. Which CSS will cause your links to have a solid blue background that changes to semitransparent on hover?

  1. A✔️
a:link {
  background: #0000ff;
}
a:hover {
  background: rgba(0, 0, 255, 0.5);
}
  1. B
a {
  color: blue;
}
a:hover {
  background: white;
}
  1. C
a:link {
  background: blue;
}
a:hover {
  color: rgba(0, 0, 255, 0.5);
}
  1. D
a:hover {
  background: rgba(blue, 50%);
}
a:link {
  background: rgba(blue);
}

Q66. Which CSS rule takes precedence over the others listed?

  1. div.sidebar {}
  2. * {}
  3. div#sidebar2 p {}✔️
  4. .sidebar p {}

Q67. The body of your page includes some HTML sections. How will it look with the following CSS applied?

body {
  background: #ffffff; /* white */
}
section {
  background: #0000ff; /* blue */
  height: 200px;
}
  1. blue sections on a white background✔️
  2. Yellow sections on a blue background
  3. Green sections on a white background
  4. blue sections on a red background

Q68. Which CSS keyword can you use to override standard source order and specificity rules?

  1. !elevate!
  2. *prime
  3. override
  4. !important✔️

Q69. You can use the ___ pseudo-class to set a different color on a link if it was clicked on.

  1. a:visited✔️
  2. a:hover
  3. a:link
  4. a:focus

Q70. Which color will look the brightest on your screen, assuming the background is white?

  1. background-color: #aaa;
  2. background-color: #999999;
  3. background-color: rgba(170,170,170,0.5);
  4. background-color: rgba(170,170,170,0.2);✔️

Q71. Which CSS selector can you use to select all elements on your page associated with the two classes header and clear?

  1. ."header clear" {}
  2. header#clear {}
  3. .header.clear {}✔️
  4. .header clear {}

Q72. A universal selector is specified using a(n) ___.

  1. “h1” string
  2. “a” character
  3. “p” character
  4. “*” character✔️

Q73. In the following CSS code, 'h1' is the ___, while 'color' is the ___.

h1 {
  color: red;
}
  1. property; declaration
  2. declaration; rule
  3. “p” character
  4. selector; property✔️

Q74. What is an alternate way to define the following CSS rule?

font-weight: bold;
  1. font-weight: 400;
  2. font-weight: medium;
  3. font-weight: 700;✔️
  4. font-weight: Black;

Q75. You want your styling to be based on a font stack consisting of three fonts. Where should the generic font for your font family be specified?

  1. It should be the first one on the list.
  2. Generic fonts are discouraged from this list.
  3. It should be the last one on the list.✔️
  4. It should be the second one on the list.

Q76. What is one disadvantage of using a web font service?

  1. It requires you to host font files on your own server.
  2. It uses more of your site’s bandwidth.
  3. It offers a narrow selection of custom fonts.
  4. It is not always a free service.✔️

Q77. How do you add Google fonts to your project?

  1. by using an HTML link element referring to a Google-provided CSS✔️
  2. by embedding the font file directly into the project’s master JavaScript
  3. by using a Google-specific CSS syntax that directly links to the desired font file
  4. by using a standard font-face CSS definition sourcing a font file on Google’s servers

Q78. which choice is not a valid color?

  1. color: #000;
  2. color: rgb(0,0,0);
  3. color: #000000;
  4. color: 000000;✔️

Q79. Using the following HTML and CSS example, what will equivalent pixel value be for .em and .rem elements?

html {font-size: 10px}
body {font-size: 2rem;}
.rem {font-size: 1.5rem;}
.em {font-size: 2em;}

<body>
  <p class="rem"></p>
  <p class="em"></p>
</body>

  1. The .rem will be equivalent to 25px; the .em value will be 20px.
  2. The .rem will be equivalent to 15px; the .em value will be 20px.
  3. The .rem will be equivalent to 15px; the .em value will be 40px.✔️
  4. The .rem will be equivalent to 20px; the .em value will be 40px.

Q80. In this example, according to cascading and specificity rules, what color will the link be?

.example {color: yellow;}
ul li a {color: blue;}
ul a {color: green;}
a {color: red;}

<ul>
  <li><a href="#" class="example">link</a></li>
  <li>list item</li>
  <li>list item</li>
</ul>

  1. blue
  2. red
  3. yellow✔️
  4. green

Q81. What property is used to adjust the space between text characters?

  1. font-style
  2. text-transform
  3. font-variant
  4. letter-spacing✔️

Q82. What is the correct syntax for changing the curse from an arrow to a pointing hand when it interacts with a named element?

  1. .element {cursor: pointer;}✔️
  2. .element {cursor: hand;}
  3. .element {cursor: move-hand;}
  4. .element {cursor: pointer-hand;}

Q83. What is the effect of this style?

background-position: 10% 50%;
  1. The background image is placed 10% from the left and 50% from the top of its container✔️
  2. The background image is placed 10% from the bottom and 50% from the left of its container
  3. The background image is placed 10% from the right and 50% from the bottom of its container
  4. The background image is placed 10% from the top and 50% from the left of its container

Q84. How will the grid items display?

grid-template-columns: 2fr 1fr;
  1. The first column is twice the height of the second column and will be as wide as the content
  2. The first column is half the size of the container and the second column will absorb the remaining space
  3. The first column is twice as wide as the second column and will fit proportionally within the grid container✔️
  4. The first column is twice the width and height of the second column, and will fit proportionally within the grid container

Q85. Which style rule would make the image 50% smaller during a hover?

<img id="photo" alt="" src="..." />
  1. img#photo:hover {scale: 0.5;}
  2. img#photo:hover {transform: scale(0.5);}✔️
  3. img#photo {hover-scale: 0.5;}
  4. img#photo:hover {size: smaller;}

Q86. Which CSS properties can you use to create a rounded corner on just the top-left and top-right corners of an element?

A. border-radius: 10px 10px 0 0;
B. border-top-left-radius: 10px; and border-top-right-radius: 10px;
C. border-radius: 10px 0;
D. border-top-radius: 10px;
  1. A and C
  2. C and D
  3. B and C
  4. A and B✔️

Q87. Review the HTML example below. Then choose the list of selectors that select the <p>, from lowest to highest specificity.

<section>
  <p class="example">...</p>
</section>
  1. A
1. section \* {
  ...;
}
2. [class*='example'] {
  ...;
}
3. p.example {
  ...;
}
4. section p {
  ...;
}
  1. B
1. p {
  ...;
}
2. p.example {
  ...;
}
3. section p {
  ...;
}
4. [class*='example'] {
  ...;
}
  1. C
1. p.example {
  ...;
}
2. section p {
  ...;
}
3. [class*='example'] {
  ...;
}
4. section \* {
  ...;
}
  1. D✔️
1. p {
  ...;
}
2. section p {
  ...;
}
3. [class*='example'] {
  ...;
}
4. p.example {
  ...;
}

Q88. Which property is used to create a drop shadow effect on an HTML element?

  1. element-shadow
  2. outer-shadow
  3. dropbox-shadow
  4. box-shadow✔️

Q89. What is the correct selector for targeting all text inputs that are not disabled?

  1. input[type="text"]:not([disabled]) {...}✔️
  2. input[type="text"]:not("disabled") {...}
  3. input[type*="text"]:not([disabled="disabled"]) {...}
  4. input[type="text"]:not([type="disabled"]) {...}

Q90. How can you create a semi-transparent background color?

  1. background-color: hsl(0, 0, 0, 0.5);
  2. background-color: rgbx(0, 0, 0, 0.5);
  3. background-color: rgba(0, 0, 0, 0.5);✔️
  4. background-color: rgba(0, 0, 0, 1);

Q91. Which property is used to create a drop shadow effect on an HTML element?

grid-template-columns: 2fr 1ffr;
  1. The first column is half the size of the container and the second column will absorb the remaining space.
  2. The first column is twice the width and height of the second column, and will fit proportionally within the grid container.
  3. The first column is twice as wide as the second column and will fit proportionally within the grid container.✔️
  4. The first column is twice the height of the second column and will be as wide as the content.

Reference-MDN

Q92. Suppose you want to have a list of items (.item) displayed in a row and in reverse order using flexbox. What is the error in the CSS below?

.container {
  display: flex;
}
.item {
  border: 1px solid red;
  flex-direction: row-reverse;
}
  1. The value for flex-direction should be reverse-row.
  2. The .container element should have a property of flex: display.
  3. The flex-direction property should be declared in the container.✔️
  4. The display value should be flex-inline to display the items in a row.

Q93. Which choice is not a valid transition?

  1. transition: margin 1000ms ease-in-out;✔️
  2. transition: color 1.3s ease-in;
  3. transition: position 400ms linear;
  4. transition: opacity 1s ease-in;

Q94. In this example, what color will the paragraphs be and why?

article p { color: blue; }
article > p { color: green; }
<article>
  <p>Paragraph 1</p>

  <aside>
    <p>Paragraph 2</p>
  </aside>
</article>
  1. Paragraph 1 will be blue. Paragraph 2 will be green.
  2. Both paragraphs will be green.
  3. Paragraph 1 will be green. Paragraph 2 will be blue.✔️
  4. Both paragraphs will be blue.

Q95. Review the declaration of border style shown below. What is the corresponding longhand syntax?

border: 1px solid red;
  1. A border-size: 1px; border-style: solid; border-color: red;
  2. B border-size: 1px; border-type: solid; border-color: red;
  3. C✔️ border-width: 1px; border-style: solid; border-color: red;
  4. D border-width: 1px; border-line: solid; border-color: red;

Q96. Pseudo-classes are used to _.

  1. style the state of the selected element✔️
  2. insert presentational content
  3. style a specific part of the selected element
  4. style the elements using class selectors

Q97. In this example, what styles will be applied to which elements?

section {
  color: gray;
}
<section>
  <p>paragraph</p>
  <a href="#">link</a>
</section>
  1. The paragraph and link will be gray.
  2. The background color of the section element will be gray.
  3. The paragraph will be gray. The link will be the browser default, black.
  4. Only the paragraph will be gray.✔️

Q98. Which answer is an example of a type selector (also sometimes referred to as an element selector)?

  1. .header {…}
  2. header {…}
  3. #header {…}
  4. header > h1 {…}

Q99. Which answer is an example of a type selector (also sometimes referred to as an element selector)?

<style>
  ul {
    --color: red;
  }

  p {
    color: var(--color);
  }

  a {
    color: var(--color, orange);
  }
</style>
<p>Paragraph</p>
<ul>
  <li> <a href="#">list item with a link</a> </li>
  <li>list item</li>
</ul>
<style>
  ul {
    --color: red;
  }

  p {
    color: var(--color);
  }

  a {
    color: var(--color, orange);
  }
</style>
<p>Paragraph</p>
<ul>
  <li> <a href="#">list item with a link</a> </li>
  <li>list item</li>
</ul>
  1. blueblue
  2. blackblack
  3. orangeorange
  4. redred

Leave a Comment

10 + five =

CRICKET LIVE STREAMING