I don't understand this question. We use the tags to write the
templates, and then our Express app (our server.js file)
loads the templates and uses them in creating response pages.
Can someone help me out?
Sure. Your code gets a list of students from the database:
Ad you want to create a nice table of results:
Assuming your website had multiple pages, with some custom elements (e.g. only the profile page has a form to update your profile) and some elements that appear on many/most pages (a button to logout, a footer with copyright info), then partials can be a good way to have a single definition of those duplicated elements.
Examples:
What a great question! The basic idea is this:
render saying what the current page is
if statement in that code that adds a marker for the current page
aria-current=page as the attribute
[aria-current=page] as a selector in the CSS.
I loved this so much that I added it to the examples for today!
I was planning to put this off for a bit, but y'all have forced my hand.
(This will be covered in the reading on Security, after the break.)
Imagine the dynamic content allows HTML. Is that okay?
Here are two examples: XSS Demo