Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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?