From the course: Creating Web Media

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Base64 encoding images

Base64 encoding images - CSS Tutorial

From the course: Creating Web Media

Base64 encoding images

- [Chris] Hi, this is Chris Converse, and in this episode we'll take a look at Base64 encoding images. Base64 is a method of representing binary data, like graphics, as text. This means we can include graphics in an HTML, CSS, or Javascript file, by simply adding the Base64 code to those files. Then, there's no need for an external image file to be referenced, and this can be very handy for web advertisements, or any time that you don't want an extra file link to your code. So if you'd like to follow along with me, download the exercise files, and let's begin by opening the HTML file in a text editor. Now, the HTML file that we're gonna be working with is a web advertisement. Up in the head area here, we can see all of the CSS styles are inline. If I scroll down, we can see the HTML that comprises the ad. And if we scroll down even further, we can see a Javascript down here, which controls some animation. So everything that this file needs to run is in the HTML file, with the…

Contents