You don’t need external assets in an HTML file

A fun exercise from Terence Eden. You can send an HTML file over the wire including anything a website might need without requesting any other files. CSS and JavaScript are easy, because there are <script and <style tags. Images and …


The post You don’t need external assets in an HTML file appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.


This content originally appeared on CSS-Tricks and was authored by Chris Coyier

A fun exercise from Terence Eden. You can send an HTML file over the wire including anything a website might need without requesting any other files. CSS and JavaScript are easy, because there are <script> and <style> tags. Images and fonts (and pretty much whatever other kind of asset) aren’t too hard because Data URLs exist. See Terence’s post for an extra-tricky final version including .zip files.

Reminds me of a couple of other tricks…

Direct Link to ArticlePermalink


The post You don’t need external assets in an HTML file appeared first on CSS-Tricks. You can support CSS-Tricks by being an MVP Supporter.


This content originally appeared on CSS-Tricks and was authored by Chris Coyier


Print Share Comment Cite Upload Translate Updates
APA

Chris Coyier | Sciencx (2021-09-02T00:29:23+00:00) You don’t need external assets in an HTML file. Retrieved from https://www.scien.cx/2021/09/02/you-dont-need-external-assets-in-an-html-file/

MLA
" » You don’t need external assets in an HTML file." Chris Coyier | Sciencx - Thursday September 2, 2021, https://www.scien.cx/2021/09/02/you-dont-need-external-assets-in-an-html-file/
HARVARD
Chris Coyier | Sciencx Thursday September 2, 2021 » You don’t need external assets in an HTML file., viewed ,<https://www.scien.cx/2021/09/02/you-dont-need-external-assets-in-an-html-file/>
VANCOUVER
Chris Coyier | Sciencx - » You don’t need external assets in an HTML file. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/09/02/you-dont-need-external-assets-in-an-html-file/
CHICAGO
" » You don’t need external assets in an HTML file." Chris Coyier | Sciencx - Accessed . https://www.scien.cx/2021/09/02/you-dont-need-external-assets-in-an-html-file/
IEEE
" » You don’t need external assets in an HTML file." Chris Coyier | Sciencx [Online]. Available: https://www.scien.cx/2021/09/02/you-dont-need-external-assets-in-an-html-file/. [Accessed: ]
rf:citation
» You don’t need external assets in an HTML file | Chris Coyier | Sciencx | https://www.scien.cx/2021/09/02/you-dont-need-external-assets-in-an-html-file/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.