A. Both Positioned widgets must have both top and left properties.
B. Positioned widgets cannot be direct children of Stack.
C. Positioned widgets must have at least two positioning properties (top, left, bottom, right).
D. Positioned widgets can have only one property; this code is correct.
Solution
Step 1: Review Positioned requirements
Positioned widgets can use zero, one, or more positioning properties (top, left, bottom, right). Partial constraints are allowed (unspecified directions default to 0).
Step 2: Check given Positioned widgets
The first uses top: 10 (Hello positioned 10px from top, left=0). The second uses left: 20 (World positioned 20px from left, top=0). No errors; valid code.
Final Answer:
Positioned widgets can have only one property; this code is correct. -> Option D
Thinking Positioned requires at least two properties
Believing partial positioning is invalid
Confusing Positioned requirements
5. You want to create a Stack where a small green circle is always centered over a larger yellow square, regardless of screen size. Which code snippet achieves this correctly?