For Students: Turn On Block Coding

How to switch between block and code view on CodeHS

Lea Sloan avatar
Written by Lea Sloan
Updated over a week ago

Blocks in CodeHS Courses

Blocks allow you to drag and drop pieces of code together instead of typing everything out. If your teacher allows blocks for your course, you can switch back and forth between Block and Code view in the Code Editor.

If blocks are allowed, you will see a bar near the top that says Switch to Block View:

Image showing how to switch to block view with button at top of IDE

Or Switch to Code View:

Image showing how to switch to code view at top of IDE

Change Default Preferences for Blocks

To set your default preferences, click the gear icon in the top-left of the Code Editor.

Image showing gear icon in top-left corner to change settings

Then, toggle this option to automatically display blocks when your teacher has allowed them. It should look like this:

Gif showing turning on blocks by default in the code editor

Can I ask my teacher to enable blocks?

You can reach out to your teacher to ask if they can enable blocks by going to More > Conversation near the top-right corner of your Code Editor.

Here, you can ask them to enable blocks for the assignment you're working on:

Image showing more>conversations to message your teacher

Blocks in the CodeHS Sandbox

Even if your CodeHS course does not allow blocks, you can use Blocks in Sandbox programs.

Blocks are only available for the following languages / Sandbox program types:

  • Karel in JavaScript

  • HTML

  • Coding in Art, Music, or Sports

To toggle blocks, click the gear icon in the upper-left and toggle Block/Text settings (you will have to refresh to see the changes):

Enable blocks in the Sandbox by changing editor settings

Your view may also look like this:

Change code editor settings


Still have questions? Ask your teacher!

Did this answer your question?