Add text to user login page I'm attempting to add text to user login page, with general info about accounts rather than only displaying the login form.

I have a page.html.twig template like so

{{ page.header }}
&lt;h2&gt;This is my page template&lt;/h2&gt;
{{page.content}}
{{ page.footer }}


I then can create content in page--user--login.html.twig like so.

{{ page.header }}
&lt;h2&gt;This is my page template&lt;/h2&gt;
&lt;p&gt;Enter your login information here&lt;/p&gt;
{{page.content}}
{{ loginform }}
{{ page.footer }}


But is there anyway to just add text to the login form without recreating page.html.twig. Since it would just be a copy I'd rather consolidate everything so any change wouldn't have to be made to both. Is there a template I could use like node--user--login.html.twig. So that the content would use page.html.twig and use the page.content block?

I understand that you can make changes to the form using a theme_form_alter hook but I'm not sure how to add html to the form from there. I can only change things like placeholder text, and submit values.
You can do this very simple way using hook_form_FORM_ID_alter.

Paste following code in your themename.theme file and clear the cache

function YourThemeName_form_user_login_form_alter(&amp;$form, FormStateInterface $form_state) {
    $form['newline'] = array(
      '#type' =&gt; 'markup',
      '#markup' =&gt; t('&lt;h2&gt;Enter your login information here!&lt;/h2&gt;'),
      '#weight' =&gt; -10,
    );
}


Image output:

Before:


  


After:


  


This way you do not need to worry about anything, it will only show in Login page.