Customize HTML,CSS of Doctype Having WebViews / WebForms

Hello there,
By default when we create a doctype with has web_view access, one doctype_row.html is generated which extends some header and footer, which I can’t see in the code but somehow it is getting injected into that file.

From where I can update so I can have my customer header or footer and highly customize the listing pages as well as the individual doc_type details page.

Same doubt I have with WebForms as well.