Issue in rendering a custom html template on form submission

I have made a custom registration form and want to show another html page on form submission. For rendering a template I have used :
html_content = frappe.render_template(“userloginapp/www/success.html”, context=a)
frappe.respond_as_web_page(“Custom Page”, html_content)

The issue is the rendered page is like:

I don’t want the default frappe’s header and footer which is showing on the page, I don’t know how to remove that and show the custom html page.

Please help.

add CSS in success.html

<!-- Hide Header -->
nav.navbar.navbar-light.navbar-expand-lg {
    display: none;
}

<!-- Hide Footer -->
footer.web-footer {
    display: none;
}

I hope this helps.

Thank You!