> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/thymeleaf/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/thymeleaf/i.-using-thymeleaf/4-standard-expression-syntax/4.6-zi-mian-liang/boolean-literals.md).

# 布尔字面量

布尔字面量是`true`和`false`。比如：

```markup
<div th:if="${user.isAdmin()} == false"> ...
```

在这个例子里，`== false`写在了花括号的外面，所以Thymeleaf会照看它。如果它写在花括号里面，则由OGNL/SpringEL引擎负责：

```markup
<div th:if="${user.isAdmin() == false}"> ...
```
