To solve the problem using a ratio and a tape diagram, we start with the given ratio of Olivia's allowance to Sylvia's allowance, which is 2:3. This means that for every 2 parts of allowance Olivia gets, Sylvia gets 3 parts.
Let's represent the allowances in parts based on the ratio:
- Olivia's part = 2
- Sylvia's part = 3
Sylvia received $21, which corresponds to the 3 parts in the ratio. To find the value of each part, we divide Sylvia's allowance by the number of parts that correspond to her allowance:
\[ \text{Value of one part} = \frac{\text{Sylvia's allowance}}{\text{Number of parts for Sylvia}} = \frac{21}{3} = 7 \]
Now we can find Olivia's allowance. Since Olivia gets 2 parts:
\[ \text{Olivia's allowance} = \text{Value of one part} \times \text{Number of parts for Olivia} = 7 \times 2 = 14 \]
Therefore, Olivia's allowance is \(\boxed{14}\) dollars.