For example,there is
when viewing the page source in the browser will be<div >111</div>
why is this happening?Аnd where I can read about it in more detail?
This feature of having @ and class name for an attribute is called as Conditional Attributes, as part of Razor engine. The razor engine will replace an empty string when null is passed.
<div class="@className"></div> When className = null <div></div> -- In your case you got an additional space too, could be due to razor engine parser. When className = "" <div class=""></div> When className = "my-class" <div class="my-class"></div>
Hope this helps.