I think you are looking for 8.3 Flexible layouts The documantation is awesome and easy to follow, but here is also simple case for just inserting title string
layouts/layout.html
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" th:fragment="page(title)">
<head th:replace="fragments/head :: common_header(title=${title})"></head>
<body>
<div th:replace="this :: content"></div>
</body>
</html>
fragments/head.html
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:fragment="common_header(title)">
<title th:text="${title}">The awesome application</title>
</head>
<body></body>
</html>
index.html (indexTitle
comes from controller or you can just put string there)
<html xmlns:th="http://www.thymeleaf.org"
th:include="layouts/layout :: page(title=${indexTitle})">
<head></head>
<body>
<section th:fragment="content">
<div class="block">Part of index.html</div>
</section>
</body>
</html>
And here is also simplified github demo from one of my project you can play with