CiTi · Computer Coding · Year One · Unit 3
Student Handout
Square brackets mean WebDNA. HTML tags use angle brackets, like <p>. WebDNA tags use square brackets, like [date]. When you see square brackets in your code, the server runs that part.
WebDNA only works on the server. Always test through your live URL (http://dev.citicoders.org/...). If you open the file from your desktop or preview it from Sublime, no server runs it, and your tags show up as plain text like [date].
Predict what each tag will show. Then put it on your page, upload, and write what it really showed.
| Tag | I predict | It showed |
|---|---|---|
| [date format=%B %d, %Y] | ||
| [date format=%a %m/%d] | ||
| [time format=%I:%M %p] | ||
| [date format=%A, day %j of %Y] |
Codes: %A Monday · %a Mon · %B September · %b Sep · %m month 01–12 · %d day 01–31 · %Y 2026 · %y 26 · %j day of year · %I hour 01–12 · %H hour 00–23 · %M minute · %S second · %p AM/PM. Case matters!
Your footer needs a copyright year that updates itself, plus one date/time line using at least three format codes.
The code I wrote (copy it from Sublime) What it displayed on my live pageChecklist: homepage fully working before other pages · each page file holds only the three include lines and the bodycopy · every link, image, CSS, and include path uses the full site path · every page has its styling and images · tested every link from every page on the live site.
Make one change at a time. Predict first, test on the live page, then undo it before the next one.
[dat]%M to %mabout/index.html, change the nav include to the short path [include file=includes/nav.inc]header.inc, shorten the CSS link to href="css/style.css". Load the homepage, then the About page.Check each one when you feel confident you can do it.
[date] tag?
Name one change to my site that now takes one edit instead of five
Use this space for anything: questions, reminders, code you want to keep.