Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Spring Basics Creating Controllers and Views Adding Static Assets

Jeremy Yi
Jeremy Yi
9,512 Points

What is 'th' here?

I dont understand the meaning for 'th' here. Could anyone tell me more about it?

Doron Zehavi
Doron Zehavi
Courses Plus Student 1,616 Points

It is an attribute of the namespace for Thymeleaf. You specified a namespace using xmlns which enables using attributes from the specified namespace. Then you use the th attribute to let Thymeleaf know about the href you want it to process.

2 Answers

Tony Martin
Tony Martin
5,570 Points

As a side note for anyone else with this question:

Doron has it right, however, I wanna add a piece of extra info. You could actually turn the 'th' into anything you want when you declare the namespace. For instance, using:

<html xmlns:SOMETHINGELSE="http://www.thymeleaf.org">

in your namespace declaration would replace the use of 'th' with 'SOMETHINGELSE'

Ok but why are we using a url for thymeleaf.org if this is just a namespace?