Skip to main content
CSS-Tricks
  • Articles
  • Videos
  • Almanac
  • Newsletter
  • Guides
  • Books
Search Account

Articles Tagged
syntax

11 Articles
{
,

}
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 its typed. There are projects like this, like CodeMirror, Ace, and …

Avatar of Oliver Geer
Oliver Geer on Apr 16, 2021
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
…
Avatar of Sebastiano Guerriero
Sebastiano Guerriero on Apr 21, 2020
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 …

Avatar of Mike Turley
Mike Turley on Feb 13, 2020 (Updated 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 …

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

(Why) Some HTML is “optional”

Direct Link

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".
Avatar of Robin Rendle
Shared by 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 …

Avatar of Chris Coyier
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… …

Avatar of Robin Rendle
Robin Rendle on Apr 17, 2019
Direct link to the article Resilient, Declarative, Contextual
learning syntax

Resilient, Declarative, Contextual

Direct Link

Keith J. Grant:

I want to look at three key characteristics of CSS that set it apart from conventional programming languages: it’s resilient; it’s declarative; and it’s contextual. Understanding these aspects of the language, I think, is key to becoming

…
Avatar of Chris Coyier
Shared by Chris Coyier on Jun 25, 2018
Direct link to the article Combining the Powers of SEM and BIO for Improving CSS
bem itcss oocss specificity syntax

Combining the Powers of SEM and BIO for Improving CSS

CSS is easy, some might argue, but that “easiness” can cause messy code. This is especially true through power of preprocessors like Sass or Less where, if you aren’t careful, your CSS can become harder to deal with instead of …

Avatar of Ryan Yu
Ryan Yu on Jun 4, 2018 (Updated on Jun 9, 2018)
Direct link to the article CSS Basics: The Syntax That Matters & The Syntax That Doesn’t
css basics syntax

CSS Basics: The Syntax That Matters & The Syntax That Doesn’t

When you’re starting to play around with CSS at the very beginning, like any other language, you have to get used to the syntax. Like any syntax, there are a bunch of little things you need to know. Some …

Avatar of Chris Coyier
Chris Coyier on Feb 12, 2018 (Updated on Apr 2, 2019)
Direct link to the article CSS Ruleset Terminology
syntax terminology

CSS Ruleset Terminology

I was trying to think of the name of a thing in the CSS vernacular the other day. It made me think we should have some kind of reference right here on CSS-Tricks, as a site with CSS in the …

Avatar of Chris Coyier
Chris Coyier on May 3, 2017
Our Learning Partner
Frontend Masters logo
Frontend Masters

Need front-end development training?

Frontend Masters is the best place to get it. They have courses on all the most important front-end technologies, from React to CSS, from Vue to D3, and beyond with Node.js and Full Stack.

CSS-Tricks is created by Chris and a team of swell people.

Keep up to date on web dev

with our hand-crafted weekly newsletter

Tech
  • WordPress (CMS)
  • Jetpack (Search, Backup)
  • WooCommerce (eCommerce)
  • Local (Development)
Hosting
  • Flywheel
Family
  • CodePen
  • ShopTalk Show
Minisites
  • The Power of Serverless
  • Upcoming Conferences
  • Coding Fonts
Contact
  • Email
  • Sponsorship Info
  • Guest Writing
Buy
  • Posters & Swag
  • Membership
Follow
  • Twitter
  • Instagram
  • YouTube
  • CodePen
  • GitHub
  • iTunes
  • RSS
Back to Top