Skip to main content

Fundamentals of Front End Development MCQs with Answers

Practice important Fundamentals of Front End Development MCQs with answers and explanations.

Chapter: 133
Q1521:
In the linear gradient example, what is the start position of the gradient?
A. (0,0)
B. (10,10)
C. (0,200)
D. (200,0)
Correct Answer: A
Chapter: 133
Q1522:
What does the method createRadialGradient(x,y,r,x1,y1,r1) define?
A. The start and end points of a gradient
B. The start and end points of a radial gradient
C. The colors used in a gradient
D. The color stops of a gradient
Correct Answer: B
Chapter: 133
Q1523:
How many color stops are used in the radial gradient example?
A. 1
B. 2
C. 3
D. 4
Correct Answer: B
Chapter: 134
Q1524:
What method is used to draw filled text on a canvas?
A. fillText
B. strokeText
C. drawText
D. setText
Correct Answer: A
Chapter: 134
Q1525:
What property defines the font properties for text on a canvas?
A. font
B. text
C. style
D. color
Correct Answer: A
Chapter: 134
Q1526:
How do you draw text without filling it on a canvas?
A. strokeText
B. fillText
C. drawText
D. setText
Correct Answer: A
Chapter: 134
Q1527:
In the code example, what is the font size used for drawing text?
A. 20px
B. 25px
C. 30px
D. 35px
Correct Answer: C
Chapter: 134
Q1528:
What method is used to set the font for text in HTML5 Canvas?
A. setFont
B. font
C. textStyle
D. fontSize
Correct Answer: B
Chapter: 134
Q1529:
In the code example, what is the position of the text on the canvas?
A. (10,50)
B. (50,10)
C. -10100
D. (100,10)
Correct Answer: A
Chapter: 134
Q1530:
Fill in the blank: To draw text on a canvas with no fill, you use the method ______.
A. strokeText
B. fillText
C. drawText
D. setText
Correct Answer: A
Chapter: 134
Q1531:
Fill in the blank: The font property in the canvas context defines the ______ for the text.
A. color
B. font size and style
C. position
D. text content
Correct Answer: B
Chapter: 135
Q1532:
What method is used to draw text with a stroke on a canvas?
A. strokeText
B. fillText
C. drawText
D. setText
Correct Answer: A
Chapter: 135
Q1533:
What property is used to define the font for text in HTML5 Canvas?
A. font
B. text
C. style
D. color
Correct Answer: A
Chapter: 135
Q1534:
In the code example, what is the font size used for the stroked text?
A. 20px
B. 25px
C. 30px
D. 35px
Correct Answer: C
Chapter: 135
Q1535:
How do you draw stroked text on a canvas?
A. ctx.strokeText("Some text",10,50)
B. ctx.fillText("Some text",10,50)
C. ctx.drawText("Some text",10,50)
D. ctx.setText("Some text",10,50)
Correct Answer: A
Chapter: 135
Q1536:
Fill in the blank: To draw text with a stroke, you use the method ______.
A. strokeText
B. fillText
C. drawText
D. setText
Correct Answer: A
Chapter: 135
Q1537:
Fill in the blank: The font property in the canvas context sets the ______ for text rendering.
A. color
B. font size and style
C. position
D. text content
Correct Answer: B
Chapter: 136
Q1538:
What does SVG stand for?
A. Scalable Vector Graphics
B. Scalable Visual Graphics
C. Scaled Vector Graphics
D. Scaled Visual Graphics
Correct Answer: A
Chapter: 136
Q1539:
Which element is used to contain SVG graphics in HTML5?
A. <svg>
B. <circle>
C. <rect>
D. <polygon>
Correct Answer: A
Chapter: 136
Q1540:
What does the cx attribute define in an SVG circle?
A. Center x-coordinate
B. Center y-coordinate
C. Radius of the circle
D. Stroke width
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Fundamentals of Front End Development

🚀 Start Quiz Now