[Solved] is it possible to include a css file into just one html tag?


i think you’re missing the purpose of CSS.

HTML are your data, with a potential unlimited tags names. CSS is here for provading style to your data, whatever the html tag is.

You can achive what you’re trying do with JavaScript, but i really don’t push you to do it that way.

With jquery :

$("ul").each(function(index) {
      $("head").append("<link href="https://stackoverflow.com/questions/29645562/css/ul"+index+".css" rel="stylesheet" type="text/css">");
    });

This spinnet add a css file named ul1.css, ul2.css for each UL you got in your page.

2

solved is it possible to include a css file into just one html tag?