0

How do you create a library for HTML?

Do you create library’s by code name? Then use <script src=“codeName”? https://code.sololearn.com/WSlL1o3bg7eG/?ref=app

10th Jun 2020, 8:03 PM
Sali65
Sali65 - avatar
5 odpowiedzi
0
Embedding some kind of 'library' within an HTML document would not be as resource-saving as it should be. Your users won't appreciate that later. Btw. what's the use case for that? Do you wanna split a single document or are you talking about CSS or js you wanna separate? For js you would of course link it as you suggested. CSS is linked as normal stylesheets. You may outsource SVG codes. But the only way I see to extract HTML itself is using frames, though they would be misused here. Frames themselves are deprecated and iframes were designated to embed foreign (!) contents. Last but not least: If you're building a document template, you may combine as many template pieces as you wish, but they must be plugged together via any scripting language or framework (e.g. Python or PHP).
11th Jun 2020, 3:36 AM
Sandra Meyer
Sandra Meyer - avatar
0
Sandra Meyer I dont need the html but i need css and js
11th Jun 2020, 6:10 PM
Sali65
Sali65 - avatar
0
Of course you can embed as many JS scripts and CSS stylesheets as you want, but this is still not resource-saving. Embed it as I already described it.
11th Jun 2020, 6:27 PM
Sandra Meyer
Sandra Meyer - avatar
0
Then you put it in a server?
29th Jun 2020, 3:18 PM
Sali65
Sali65 - avatar
0
Where else... If you want to have it online...
29th Jun 2020, 3:24 PM
Sandra Meyer
Sandra Meyer - avatar