<input type="submit" value="Subscribe!" th:attr="value=#{subscribe.submit}"/>
<input type="submit" value="๊ตฌ๋
!" /> // #{subscribe.submit}์ ๊ฐ์ด "๊ตฌ๋
!"์ธ ๊ฒฝ์ฐ
<input type="submit" value="Subscribe!" th:value="#{subscribe.submit}"/>
<input type="submit" value="๊ตฌ๋
!" />
<input type="checkbox" name="active" th:checked="${user.active}" />
// ${user.active} == true ์ด๋ฉด checked="checked" ์์ฑ ์ถ๊ฐ
<input type="button" value="Do it!" class="btn" th:attrappend="class=${' ' + cssStyle}" />
<input type="button" value="Do it!" class="btn" th:classappend="${' ' + cssStyle}">
// ${cssStyle} == โwarningโ ์ผ ๋, class="btn warning" ์์ฑ ์์ฑ
User ๊ฐ์ฒด๊ฐ 3๊ฐ ์ ์ฅ๋ List ์ปฌ๋ ์ ์ ๋ฐ๋ณต
<tr th:each="user : ${users}">
<td th:text="${user.username}">username</td>
<td th:text="${user.age}">0</td>
</tr>
๐ฆ count ์์
<th:block th:each="data,status:${datas}">
<h1 th:text="|${status.count} ${data}|"></h1>
</th:block>
<h1>1 apple</h1>
<h1>2 banana</h1>
<h1>3 cherry</h1>
๐ฆ odd ์์
<tr th:each="prod,iterStat : ${prods}" th:class="${iterStat.odd} ? 'odd'">
<tr>
)์ ๋ํด์๋ง class="odd" ์์ฑ์ ์์ฑ<div th:unless="${session.authInfo}">
<!โsession์ authInfo๊ฐ์ฒด๊ฐ ์๋ ๊ฒฝ์ฐ(null), ํ์ ์ฝ๋ ์คํ-->
...
<div th:if="${session.authInfo}">
<!โsession์ authInfo๊ฐ์ฒด๊ฐ ์กด์ฌํ ๊ฒฝ์ฐ, ํ์ ์ฝ๋ ์คํ-->
...
๐ง ํท๊ฐ๋ฆฌ๋ ์ฝ๋
<table th:unless="${#lists.isEmpty(members)}"> <!-- th:if="${not#lists.isEmpty(members)}" ์ ๋์ผ-->
<div th:switch="${user.role}">
<p th:case="'adminโโ>an administrator</p>
// ${user.role}==โadminโ์ผ ๋
<p th:case=โ#{roles.manager}โ>a manager</p>
// ${user.role}==#{roles.manager}์ผ ๋
<p th:case=โ*โ>some other thing</p>
// ๊ทธ ์ธ(default)
</div>