How can I avoid wrapping my block into  tags? I have created a custom block 

/**
 * @Block(
 *   id = "block_text",
 *   admin_label = @Translation("Text"),
 *   category = @Translation("Text"),
 * )
 */


And here is a build() function

/**
 * {@inheritdoc}
 */
public function build() {

  return [
    '#type' =&gt; 'markup',
    '#markup' =&gt; $render,
    '#cache' =&gt; [
      'max-age' =&gt; 0
    ],
  ];

}


On the page my block is wrapped into 

&lt;div id="block_text"&gt; &lt;/div&gt; tags 


Could you please tell me, how can I avoid this wrapping?
I think you should copy block.html.twig (perhaps from /core/themes/classy/block/block.html.twig) in your custom module/theme and make it work for your specific block by naming it block--BLOCKID.html.twig and remove the outer &lt;div&gt; from this twig file.

Alternativelly you can create a custom template