Custom text/html in custom form module I am following this tutorial and I've already created my custom form as Drupal 8 module.

I wonder, how to add custom text/html in form? I mean when somebody goes to the path pointed in *.routing.yml, I would like to display not only form fields, but also some intro html/text.

I know the form building is here:

public function buildForm(array $form, FormStateInterface $form_state) {

$form['name_surname'] = array(
  '#type' =&gt; 'textfield',
  '#title' =&gt; t('Name and surname:'),
  '#required' =&gt; TRUE,
);
...
}


But I don't know what kind of entry (or #type) should I insert to get just an custom html/text block between fields or above them all?
What kind of entry (or #type) should I insert to get just an custom
  html/text block between fields or above them all?


Item element type provides a display-only form element with an optional title and description.

$form['help'] = [
  '#type' =&gt; 'item',
  '#title' =&gt; t('Block title'),
  '#markup' =&gt; t('Block content'),
];


You may also add arbitrary content to render arrays using the #markup render array key as follows.

$form['text']['#markup'] = t('Some text.');