I'm fairly new to drupal and this is my first time posting on stackexchange. Constructive critisism and feedback are more than welcome.

All regions in my custom theme are placed inside the body tag from html.html.twig file. Is there any way to create a region that is located underneath the body?

The markup should look something like this:

<header>header region block(s)</header>
<footer>footer region block(s)</footer>

Right now the way it's rendered it looks like this:

 <header>header region block(s)</header>
 <footer>footer region block(s)</footer>

I'm on drupal 8.6. Thanks in advance, Geordi

  • Already tried the answer to this question Insert region into html.html.twig but to no avail. Using this is was able to call the region in the html.html.twig file but it was still being rendered inside the body tag. Commented May 1, 2019 at 13:22

1 Answer 1


Best practice dictates that you should not put the header or footer outside of the body tag. All visible content on your site goes inside the body tag.

Correct HTML syntax looks like this (here is a basic example):

  <title>My Drupal site</title>
  <!-- Other metadata goes here -->
    <!-- Top of the page content goes here -->
    <!-- Main body content goes here -->
    <!-- Footer content goes here -->

See this page for some extra details https://www.w3schools.com/html/html5_semantic_elements.asp

I know this doesn't technically anwer your question, but I feel this is a "correct" response in regards to what information will be most helpful.

  • 1
    Will look into it, thank you very much! Commented May 2, 2019 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.