Optional: markup objects
The technique
cit uses the innermost element around the cursor, here em. cat would replace <em>draft</em> as a whole.
Keys in this lesson
- cit
- Change inside an HTML element.
- cat
- Change the element, tags included.
Before this lesson: Paired objects.
More about this lesson
Change the text inside an HTML element, or replace the element and its tags.
In JavaScript the examples are JSX components, and in Python and plain text they're HTML templates. it is the text inside an element and at includes its opening and closing tags. You can start anywhere in the element, even on one of its tags. With nested elements, start inside the one you mean. This lesson is optional.
Example
From inside <em>draft</em>, cit then final then Esc keeps the em tags. cat replaces the whole element.
Use Start over to try again.
Guides on this topic
Exercise 1 of 2
0keys
par 36You can follow a parcel in the app now. Make the paragraph under Delivery say Follow your parcel in the app.
Make it look like this
import { formatMoney } from "../lib/money"; export function DeliveryNote({ freeFromCents }) { return ( <aside className="delivery-note"> <h3>Delivery</h3> <p>Follow your parcel in the app.</p> <small>Free delivery from {formatMoney(freeFromCents)}</small> </aside> ); }