It seems you want to display the content in a HTML format that some part of it was derived from database, right?If so, perhaps you may try How to Load Data from Database into Custom Files (v2022)
Even the code is for Custom Files, however you may get the similar logic on how to get values through loop of recordset.