Section are the part of HTML which is to be rendered in layout page. In Layout page we will use the below syntax for rendering the HTML :
@RenderSection("TestSection")
And in child pages we are defining these sections as shown below :
@section TestSection{
<h1>Test Content<h1>
}
If any child page does not have this section defined then error will be thrown so to avoid that we can render the HTML like this :
@RenderSection("TestSection", required: false)