Using custom HTML elements and HTML elements with identifiers or classes

Out of curiosity, if any, will it affect the site or page if, instead of using identifiers or classes for elements, you simply create custom w / JS elements and style them using CSS?

For example, if I create a container element and use it as <container> instead <div class="container">, is there a difference in performance or something else?

I don’t see that this is often used, and I wonder why?

+5
source share
3 answers

", , ?" , ;)

HTML , valid. , , .

, ; World Wide Web - , , , , ... , , .

, : " , w/JS CSS?" . HTML, , .

(/ ) , XML. XML "" , CSS .

, , XML :

index.xml

<?xml-stylesheet href="style.xml.css"?>
<example>
 <summary>
     This is an example of making up tags in XML, and applying a stylesheet so you can open the file in a browser.
 </summary>
 <main>
     <container>This is the stuff in the container</container>
 </main>
</example>

style.xml.css

summary {
    display:none;
}
main container {
    border:2px solid blue;
    background:yellow;
    color:blue;
}
+2

HTML , . , , , HTML HTML .

+2

HTML - , . , , , .

, , . , div. , . HTML- HTML5 .

, <div class="container">...</div> .

+1
source

All Articles