MCQs > Website Designing & Development > Front-end Development MCQs > Basic Front-end Development MCQs

Basic Front-end Development MCQ

1. In a grid layout, which property will create gaps between the rows in the grid?

Answer

Correct Answer: Row-gap

Note: This Question is unanswered, help us to find answer for this one

2. Which CSS property and value would correctly remove the bullets from a list item?

Answer

Correct Answer: List-style-type: none

Note: This Question is unanswered, help us to find answer for this one

3. What does setting aria-live=polite on a live region achieve?

Answer

Correct Answer: The screen reader will wait until there is a pause to announce changes.

Note: This Question is unanswered, help us to find answer for this one

4. What is meant by the term "polyfill" when used in web development?

Answer

Correct Answer: It is a piece of code that provides modern functionality in browsers that do not support it.

Note: This Question is unanswered, help us to find answer for this one

5. What is the name of the event that occurs when the mouse pointer hovers over an element?

Answer

Correct Answer: Mouseover

Note: This Question is unanswered, help us to find answer for this one

6. What is yarn?

Answer

Correct Answer: A JavaScript package manager

Note: This Question is unanswered, help us to find answer for this one

7. What is the definition of the phrase “Time to Interactive”?

Answer

Correct Answer: When the user can consistently interact with all of the page elements

Note: This Question is unanswered, help us to find answer for this one

8. 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?

Answer

Correct Answer: Items have been positioned in such a way that they are in a different order to the source.

Note: This Question is unanswered, help us to find answer for this one

9. What is WebP?

Answer

Correct Answer: A next-generation image format offering a smaller file size than equivalent PNG or JPEG images

Note: This Question is unanswered, help us to find answer for this one

10. What does the term "tree shaking" mean with regard to JavaScript performance?

Answer

Correct Answer: Removing unused code from the JavaScript files

Note: This Question is unanswered, help us to find answer for this one

11. The flex property is often applied to flex items with a value of 1. Using flex: 1 is a shorthand - what does it unpack to?

Answer

Correct Answer: Flex: 1 0 0;

Note: This Question is unanswered, help us to find answer for this one

12. You discover that CSS is being loaded on a website using the following code. Why might a web developer have done this?

Answer

Correct Answer: The CSS is being loaded asynchronously in order to prevent render blocking.

Note: This Question is unanswered, help us to find answer for this one

13. 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?

Answer

Correct Answer:

Note: This Question is unanswered, help us to find answer for this one

14. 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?

Answer

Correct Answer: Filter()

Note: This Question is unanswered, help us to find answer for this one

15. 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?

Answer

Correct Answer: .box { overflow: auto; }

Note: This Question is unanswered, help us to find answer for this one

16. _ 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 element (or its nearest positioned ancestor element)?

Answer

Correct Answer: Absolute positioning

Note: This Question is unanswered, help us to find answer for this one

17. In normal flow, some elements display as block elements default and others inline. which choice contains only block-level by default elements?**

Answer

Correct Answer: Div, main, h1

Note: This Question is unanswered, help us to find answer for this one

18. 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?

Answer

Correct Answer: Object-fit: cover

Note: This Question is unanswered, help us to find answer for this one

19. Which choice does not provide information on browser support for a particular CSS property?

Answer

Correct Answer: The Web Platform Tests Suite

Note: This Question is unanswered, help us to find answer for this one

20. Which choice is not a render blocking resource?

Answer

Correct Answer: Images

Note: This Question is unanswered, help us to find answer for this one

21. A webpage has rel="preconnect" added to a link resource. What will this do?

Answer

Correct Answer: It will tell the browser that a connection will be made to another origin and to start getting ready as soon as possible.

Note: This Question is unanswered, help us to find answer for this one

22. How can you rewrite this function using arrow function syntax?

Answer

Correct Answer: Let product = (x,y) => x*y;

Note: This Question is unanswered, help us to find answer for this one

23. Which choice is a correct use of the parseInt() function in Javascript that parses a string and return an integer?

Answer

Correct Answer: parseInt("6");

Note: This Question is unanswered, help us to find answer for this one

24. You have placed an image in a directory named images and want to reference it from a page located in the root of your site. Which choice would correctly display the image on the page?

Answer

Correct Answer: < img src="images/image.jpg">

Note: This Question is unanswered, help us to find answer for this one

25. What will this loop print? let max = 3; for (i = 0; i > max; i++) {document.write("skrt "); }

Answer

Correct Answer: Nothing

Note: This Question is unanswered, help us to find answer for this one

26. A video on your webpage does not display and the console shows an error about mixed content. What is happening?

Answer

Correct Answer: The page is loaded via HTTPS, but the video is being served insecurely as HTTP and the browser is blocking it.

Note: This Question is unanswered, help us to find answer for this one

27. Which description correctly describes the initial values of flex items if the only thing you have done is apply display: flex to their parent?

Answer

Correct Answer: Items display in a row, lined up at the start, and do not stretch to fill the container

Note: This Question is unanswered, help us to find answer for this one

28. What is the correct way to initialize an array of galaxies in JavaScript?

Answer

Correct Answer: Galaxies = ["Milky Way", "Whirlpool", "Andromeda"];

Note: This Question is unanswered, help us to find answer for this one

29. You find this code in a stylesheet. What is it being used for? .cf::after { content: '';

Answer

Correct Answer: Clearing floats in float-based layouts

Note: This Question is unanswered, help us to find answer for this one

30. How many columns will there be, given this code? .container { width: 600px; Column-width: 200px; column-gap: 50px;}

Answer

Correct Answer: Two

Note: This Question is unanswered, help us to find answer for this one

31. What is Webpack primarily used for?

Answer

Correct Answer: Bundling individual JavaScript files for use in your website

Note: This Question is unanswered, help us to find answer for this one

32. Which HTML element represents either a scalar value within a known range OR a fractional value?

Answer

Correct Answer:

Note: This Question is unanswered, help us to find answer for this one

33. How does the rem unit represent a font size?

Answer

Correct Answer: Font sizes are relative to the root em unit used in the HTML element.

Note: This Question is unanswered, help us to find answer for this one

34. Which HTML element is not considered a landmark element?

Answer

Correct Answer:


Note: This Question is unanswered, help us to find answer for this one

35. Which part of the URL https://app.uniswap.org/pool specifies the domain name

Answer

Correct Answer: Uniswap.org

Note: This Question is unanswered, help us to find answer for this one

36. Which choice is not part of CSS box model

Answer

Correct Answer: Paragraph

Note: This Question is unanswered, help us to find answer for this one

37. Which choice is not a value of the type attribute of the element?

Answer

Correct Answer: Address

Note: This Question is unanswered, help us to find answer for this one

38. Which HTML will result in text being highlighted in yellow? .highlight {background-color: yellow;}

search
Front-end Development Subjects