Skip to main content
CSS-Tricks
  • Articles
  • Notes
  • Links
  • Guides
  • Almanac
  • Picks
  • Shuffle
Search

Articles Tagged
syntax

13 Articles
Direct link to the article Why (and How) I Write Code With Pencil and Paper
process syntax work

Why (and How) I Write Code With Pencil and Paper

If the thought of handwriting code seems silly, it might surprise you to know that it’s inevitable. If you’re unsure, think about the last job interview you did, and remember how there was no computer around in the interview room …

Preethi on Aug 17, 2022
Direct link to the article Syntax Highlighting (and More!) With Prism on a Static Site
next.js static sites syntax

Syntax Highlighting (and More!) With Prism on a Static Site

So, you’ve decided to build a blog with Next.js. Like any dev blogger, you’d like to have code snippets in your posts that are formatted nicely with syntax highlighting. Perhaps you also want to display line numbers in the …

Adam Rackis on May 4, 2022
Direct link to the article Creating an Editable Textarea That Supports Syntax-Highlighted Code
forms pre syntax textarea

Creating an Editable Textarea That Supports Syntax-Highlighted Code

When I was working on a project that needed an editor component for source code, I really wanted a way to have that editor highlight the syntax that is typed. There are projects like this, like CodeMirror, Ace, …

Oliver Geer on Jan 13, 2025
Direct link to the article Building a Scalable CSS Architecture With BEM and Utility Classes
architecture bem naming syntax

Building a Scalable CSS Architecture With BEM and Utility Classes

Maintaining a large-scale CSS project is hard. Over the years, we’ve witnessed different approaches aimed at easing the process of writing scalable CSS. In the end, we all try to meet the following two goals:

  1. Efficiency: we want to
…
Sebastiano Guerriero on Oct 21, 2021
Direct link to the article Why JavaScript is Eating HTML
html-in-js react syntax

Why JavaScript is Eating HTML

Web development is always changing. One trend in particular has become very popular lately, and it fundamentally goes against the conventional wisdom about how a web page should be made. It is exciting for some but frustrating for others, and …

Mike Turley on Feb 14, 2020
Direct link to the article Two-Value Display Syntax (and Sometimes Three)
display layout syntax

Two-Value Display Syntax (and Sometimes Three)

You know the single-value syntax: .thing { display: block; }. The value “block” being a single value. There are lots of single values for display. For example, inline-flex, which is like flex in that it becomse a …

Chris Coyier on Nov 11, 2019
Direct link to the article (Why) Some HTML is “optional”
syntax

(Why) Some HTML is “optional”

Remy Sharp digs into the history of the web and describes why the "p" tag doesn’t need to be closed. Side quest fun: also where there will never be new elements added to the "head".
Robin Rendle on Sep 16, 2019
Direct link to the article Some HTML is “Optional”
standards syntax

Some HTML is “Optional”

There is a variety of HTML that you can just leave out of the source HTML and it’s still valid markup.

Doesn’t this look weird?

<p>Paragraph one.
</p><p>Paragraph two.
</p><p>Paragraph three.</p>

It does to me, but the closing tags are …

Chris Coyier on Sep 11, 2019
Direct link to the article Clever code
syntax

Clever code

This week, Chris Ferdinandi examined a clever JavaScript snippet, one that’s written creatively with new syntax features, but is perhaps less readable and performant. It’s a quick read, but his callout of our industry’s fixation on cleverness is worth… …

Robin Rendle on Apr 17, 2019
  • 1
  • 2
  • Older

CSS-Tricks is powered by DigitalOcean.

Keep up to date on web dev

with our hand-crafted newsletter

DigitalOcean
  • About DO
  • Cloudways
  • Legal stuff
  • Get free credit!
CSS-Tricks
  • Contact
  • Write for CSS-Tricks!
  • Advertise with us
Social
  • RSS Feeds
  • CodePen
  • Mastodon
  • Bluesky
Back to Top