Single, Double, and Curly Quotes

Here are my opinions on when you should use different kinds of quotation marks in code and prose.

  • Single: '
  • Double: "
  • Curly: , , ,


Efficiency and clean looks matter most with programming languages (Python, JavaScript, etc.). Use single quotes here.

// JavaScript
alert('Hello, world!');
// CSS/Sass
@import 'partials/breakpoints';

Note the 'example' within the Django code block nested in HTML here:

<!-- HTML/Django template -->
<a href="{% url 'example' %}">{{ }}</a>


HTML should use double-quotes. It’s more public (view source), so it should feel a little more official. HTML feels old fashioned in a way that befits double quotes.

<img src="" alt="A fish" />


Any text intended solely for reading should use proper curly quotes.

“Dodging and burning are steps to take care of mistakes God made in establishing tonal relationships.”

Ansel Adams

“Life is full of pain. Let the pain sharpen you, but don’t hold on to it. Don’t be bitter.”

Trevor Noah

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s