Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Visual Studio not supporting <main>?

Tags:

asp.net

My visual studio wrote that <main> tag is not supported, but i use HTML5 validator. Also, <nav> tag passed validation. What is the problem? http://i.gyazo.com/485e421e2f44202ee2905bb130719e01.png

<body>
    <div id="main-wrapper">
        <div style="width: auto; background-color: #00adae;">Главное меню</div>

        <div id="gallery-wrapper">
            <div id="categories-container">
                <div id="categories-title">@Model.Name</div>
                <div id="categories-menu-container">
                    @if (Model.Categories != null)
                    {
                        <nav id="categories-menu">
                            <ul>
                                @foreach (var category in Model.Categories)
                                {
                                    <li>
                                        <a href="#" data-category-id="@category.Id">@category.Name</a>
                                    </li>
                                }
                            </ul>
                        </nav>
                    }
                </div>
            </div>
            <div id="photos-masonry-container">
                <div id="photos-masonry-title"></div>
                <main id="photos-masonry"></main>
            </div>
        </div>
    </div>
</body>
like image 444
BJladu4 Avatar asked May 31 '14 05:05

BJladu4


Video Answer


1 Answers

Because it is not included in the related xsd schema, but you can easily add the new element

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Packages\schemas\html\html_5.xsd

<xsd:element name="main" type="simpleFlowContentElement" vs:disallowedancestor="address" />

You could also check in the schema cache

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Xml\Schemas
like image 152
alessandro Avatar answered Nov 15 '22 05:11

alessandro