intellij thymeleaf Namespace th is not bound

Also, if you are using Spring you should use the following:

<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
  <head>
     <title>Hello</title>
  </head>
  <body>
  </body>
</html>

The difference is in the DOCTYPE. See Intellij Idea: Thymeleaf namespace unkown


To enable auto completion and IDE support for Thymeleaf, make sure you have enabled the Thymeleaf plugin.

File -> Other Settings -> Config Plugins -> tick Thymeleaf

screenshot of plugin window

Also add the namespace in the root tag

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