How to Add Media to Web Projects

Adding media to your web project is a great way to make it more engaging! You can add images, sound, and video to your project by adding the appropriate link and tags to your project.

Here are some simple ways to add media to your project with HTML:

There are more advanced ways to add media with HTML. But no matter how you do it, you will need a link to your image, audio, or video. If you are adding media that is already online, you can use the existing address in your project. Or, you can upload media to your project by using the Media button.

The Media Button

Through the media button, you can upload image, sound, and video files that are saved on your computer.

To use the Media button, you must first be logged in. Then, navigate to one of your web projects. Find the “Media” button at the top of your project next to the “Clone” button.

Navigation menu displaying the options "Save", "Clone", "Media", "Cloud Variable", "Share", and text reading "Your Display Name"

When you click on the button, you will see this pop-up:

A pop-up titled "Media" with the heading "List of Media Files", followed by three buttons: "Choose Files", "Upload", and "Dismiss".

Select the “Choose Files” button. You will be prompted to select a file on your computer. When you’re done, you’ll see the name of the file you selected next to the “Choose Files” button. Select the “Upload” button on the right to upload the file to the Codecraft app.

A pop-up titled "Media" with the heading "List of Media Files", followed by three buttons: "Choose Files", "Upload", and "Dismiss". Next to the "Choose Files" button is a file name, "my-image.png".

Now you should see the file you uploaded in the list of media files!

A pop-up titled "Media" with the heading "List of Media Files", and an image preview, a URL labelled "my-image.png", and a Delete button in a row beneath the heading. At the bottom are three buttons: "Choose Files", "Upload", and "Dismiss".

Notice the URL that appears next to the media preview. You can copy this URL and paste it into your project to access your uploaded media!

A screenshot of the web editor with HTML code for an uploaded image on the left and the project preview that shows the image on the right.

If you are not the creator of your media, remember to give proper credit in your project or README!

Accepted Media Types

File uploads must be smaller than 5MBs and have names shorter than 64 characters. The Codecraft app will accept the following MIME types:

If your media does not appear in the way you’d like it to, you may be using an unsupported media type. Or, you may need to use more advanced code. Ask your Codecraft instructor for assistance!


Contact

Address

2412 Irwin Street
Melbourne, FL 32901

Email: hello@codecraftworks.com

Phone: 321-209-4674, 850-290-4714

Our Company

Learning App


Copyright ©2024, CODECRAFT WORKS. All Rights Reserved

Linkedin YouTube