Library › Coding AI › Marketing and content
Write event schema markup with the corrected date
Practice: Keeping the AI to your sources. About 5 minutes.
About this exercise
Write the JSON-LD for the workshop's event page, inside one script tag of type application/ld+json. Use only these fields: @context, @type Event, name, startDate, endDate, location (Place with name and address) and offers (price, priceCurrency USD). The workshop is in Eastern time, which is UTC-5 in December, so include the -05:00 offset. Use the date and price that are current now. One code block, then under 20 words outside the code.
Common mistakes when you ask AI for this
- Not saying what's current. The AI may mix the old date or the old price into the markup. Try: Add: "Use the Dec 5 date and the free price from the latest message."
- Not giving the time zone. The AI leaves the time without an offset, so search tools guess the time zone. Try: Add: "Eastern time, UTC-5 in December: use -05:00."
- Not listing the fields. The AI adds performer, image and description fields nobody asked for. Try: Add: "Only these fields: ..." and list them.
- Getting a menu of options. The AI likes to offer two or three versions of the markup, so you're left to pick and test them yourself. Try: Add: "Give one markup only, in one code block, no alternatives."
- Getting a tutorial. By default the AI explains every part of the code at length, which you then have to scroll past. Try: Add: "After the code, one line under 10 words. Nothing else."
What a strong prompt includes
- Uses the latest details
- Gives the time zone
- Lists the fields
- Asks for one answer only
Related exercises
- Accept a job offer and confirm the exact terms (Writing AI · Job seekers)
- Add a cron line that matches the others in a crontab (Coding AI · Product managers)
- Add dark mode by overriding your existing CSS variables (Coding AI · Software developers)
- Add input checks to your number guessing game (Coding AI · High school students)
- Add input validation to a Java method with exact messages (Coding AI · Software developers)