Add HTML Tags for all the site pages I was searching around but with no clear solution for me!

I would like to add the below HTML code for all my Drupal 8 website pages:

&lt;meta name="viewport" content="width=device-width, user-scalable=no" /&gt;


How can I do that, is there a contributed module for it ?

Thank you,
1. Using metatag module

If you want to do it without custom coding you can try metatag module 


enable MOBILE &amp; UI ADJUSTMENTS submodule
go to metatag settings admin/config/search/metatag
edit the GLOBAL settings
under MOBILE &amp; UI ADJUSTMENTS fill in viewport input box




2. Using viewport module

There is also a dedicated module called viewport which will allow you to do just that.

3. In your custom theme

But can be easily done in your custom theme. Put the following code inside the THEMENAME_preprocess_html function in your THEMENAME.theme

function THEMENAME_preprocess_html(&amp;$variables) {
  $viewport = [
    '#type' =&gt; 'html_tag',
    '#tag' =&gt; 'meta',
    '#attributes' =&gt; [
      'name' =&gt; 'viewport',
      'content' =&gt; 'width=device-width, user-scalable=no',
    ],
  ];
  $variables['page']['#attached']['html_head'][] = [$viewport, 'viewport'];
}


NOTE: if THEMENAME_preprocess_html function does not exist you can create it and put the code inside.  You can't redeclare it otherwise you will end up with WSOD.

function THEMENAME_preprocess_html(&amp;$variables) {
  //...
}