We recently made some updates to our Web Lab coding environment and wanted to highlight some of the new features. You’ll see these updates when creating new Web Lab projects or when using Web Lab in Unit 2 of the curriculum.
You’ll notice that files are now color-coded by their type and have new icons. Hopefully this will make it easier to quickly tell the difference between a CSS file, an HTML file, or an image.
When adding colors within a CSS file, you will now notice a purple icon that appears when you click on a color name. This icon opens a color selector widget, which makes it easier to select new colors for your website. See it in action below!
After you upload an image, you can view additional information about the image, such as it’s dimensions, starter code to use the image in your project, and prominent colors that appear in the image. There is also a new feature to apply filters to the image directly within Web Lab. See these in action below!
Web Lab now has a limit to how large projects can be - at most 20mb. You can keep track of how big your projects are using the progress meter at the top of each project. Most projects will remain under this limit, unless you are using lots of images. If so, you may want to use an outside image hosting program.
We recently made some updates to our Web Lab environment to fix some security vulnerabilities and stop Web Lab from being used to host malicious projects. You will notice that new projects are no longer able to use
<script> tags as part of their code. Any existing projects that use these tags will still work correctly - however, once you begin editing these projects, these tags will be automatically removed from the project. Additionally, the
<meta> tag was restricted to block the ‘http-equiv’ attribute. This means that the
<meta> tag is still supported, but not in combination with the ‘http-equiv’ attribute.
If you were using these tags to embed videos on your website, you can still do this with the tag - see this example for more information. If you would like to use the
<script> tags in your projects, we recommend switching to a different web editing environment, such as glitch.com.
We’re excited to bring these new updates to our tools, and hope they make it easier for students to express their creativity by making dynamic, personalized websites!
Code.org CS Discoveries Team