0
0
Figmabi_tool~10 mins

Font size and line height in Figma - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the font size to 16 pixels in Figma.

Figma
textNode.fontSize = [1]
Drag options to blanks, or click blank then click option'
A16px
B'16px'
C16
Dsize16
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string like '16px' instead of a number.
Including units like 'px' in the value.
2fill in blank
medium

Complete the code to set the line height to 24 pixels in Figma.

Figma
textNode.lineHeight = [1]
Drag options to blanks, or click blank then click option'
A24
B'24px'
ClineHeight24
D24px
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string like '24px' instead of a number.
Adding units like 'px'.
3fill in blank
hard

Fix the error in the code to correctly set font size to 18 pixels.

Figma
textNode.fontSize = [1]
Drag options to blanks, or click blank then click option'
A18px
B18
CfontSize18
D'18px'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string with 'px' units.
Including units in the value.
4fill in blank
hard

Fill both blanks to set font size to 20 and line height to 28 pixels.

Figma
textNode.fontSize = [1]
textNode.lineHeight = [2]
Drag options to blanks, or click blank then click option'
A20
B28
C'28px'
D'20px'
Attempts:
3 left
💡 Hint
Common Mistakes
Using strings with 'px' units.
Mixing numbers and strings.
5fill in blank
hard

Fill all three blanks to set font size to 14, line height to 21, and assign the font family 'Roboto'.

Figma
textNode.fontSize = [1]
textNode.lineHeight = [2]
textNode.fontName = [3]
Drag options to blanks, or click blank then click option'
A14
B21
C{ family: 'Roboto', style: 'Regular' }
D'Roboto'
Attempts:
3 left
💡 Hint
Common Mistakes
Using strings for fontSize or lineHeight.
Assigning fontName as a string instead of an object.