I was hoping to find some way of entering code in the footer tag (like in my example) to stick the footer at the bottom instead of just below the end of my content. Is there a way to do this without CSS? Sorry if my terminology is off, I just started learning html a few days ago.
<!doctype html>
<html>
<head><title> Sample Website </title></head>
<body>I want the footer at the bottom of the page</body>
<footer height="0">This is a footer test for a short page</footer>
</html>
CodePudding user response:
You can do this with VERY minimal CSS..
footer {
height: 100px;
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}
<footer>
This is a footer test for a short page
</footer>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>
OR you can use inline CSS:
<footer style="height: 100px; width: 100%; position: fixed; bottom:0; left:0;">This is a footer test for a short page</footer>
CodePudding user response:
I'm wondering if this could be as simple as adding the following code to the bottom of your HTML
document.
<footer>
<p>Williz</p>
</footer>
This w3schools page provides some more context if you are interested. Overall, I agree 100% with Zak's comments and suggestions.