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

Articles Tagged
HTML

36 Articles
{
,

}
Image
Direct link to the article HTML Data Attributes Guide
attribute selectors attributes data attributes HTML

HTML Data Attributes Guide

Everything you ever wanted to know about data attributes in HTML, CSS, and JavaScript.
Image
Chris Coyier on Feb 17, 2020 Updated on Aug 12, 2024
Image
Direct link to the article The Deal with the Section Element
accessibility article HTML section

The Deal with the Section Element

Two articles published the exact same day:

  1. Bruce Lawson on Smashing Magazine: Why You Should Choose HTML5 <article></article> Over <section></section>
  2. Adam Laki on Pine: The Difference Between <section></section> and <div></div> Element

They are comparing slightly different things, but they both …

Image
Chris Coyier on Jan 15, 2020
Image
Direct link to the article Why do we use .html instead of .htm?
HTML questions

Why do we use .html instead of .htm?

Interesting question from Andy:

Serious question. Why do we use .html instead of .htm? / @adactio @css

— Andy Clarke (@Malarkey) December 12, 2019

The most likely answer from the thread: DOS was a massive operating system for PCs …

Image
Chris Coyier on Dec 26, 2019
Image
Direct link to the article Everything You Ever Wanted to Know About inputmode
forms HTML inputmode inputs

Everything You Ever Wanted to Know About inputmode

The inputmode global attribute provides a hint to browsers for devices with onscreen keyboards to help them decide which keyboard to display when a user has selected any input or textarea element.

<input type="text" inputmode="" /<textarea inputmode="" /

Unlike …

Image
Christian Oliff on May 17, 2019 Updated on Apr 27, 2020
Image
Direct link to the article Why, How, and When to Use Semantic HTML and ARIA
accessibility aria beginning web development HTML semantics

Why, How, and When to Use Semantic HTML and ARIA

Semantic HTML and Accessible Rich Internet Applications (ARIA) help create interfaces that work for everyone in the most performant, robust, and simple way possible. They add essential meaning to your content, which lets web browsers, search engines, screen readers, RSS …

Image
Adam Silver on May 7, 2019
Image
Direct link to the article Naming things to improve accessibility
a11y HTML

Naming things to improve accessibility

I like the this wrap-up statement from Hidde de Vries:

In modern browsers, our markup becomes an accessibility tree that ultimately informs what our interface looks like to assistive technologies. It doesn’t matter as much whether you’ve written this markup:

…
Image
Chris Coyier on May 1, 2019
Image
Direct link to the article The Simplest Ways to Handle HTML Includes
HTML HTML templates includes

The Simplest Ways to Handle HTML Includes

It’s extremely surprising to me that HTML has never had any way to include other HTML files within it. Nor does there seem to be anything on the horizon that addresses it. I’m talking about straight up includes, like …

Image
Chris Coyier on Apr 30, 2019 Updated on Jan 26, 2021
Image
Direct link to the article Perceived Velocity through Version Numbers
CSS HTML

Perceived Velocity through Version Numbers

HTML5 and CSS3 were big. So big that they were buzzwords that actually meant something and were a massive success story in pushing web technology forward. JavaScript names their big releases now too: ES6, ES7, ES8… and it seems …

Image
Chris Coyier on Apr 29, 2019
Image
Direct link to the article Could Grouping HTML Classes Make Them More Readable?
classes HTML selectors semantics

Could Grouping HTML Classes Make Them More Readable?

You can have multiple classes on an HTML element:

<div class="module p-2"></div>

Nothing incorrect or invalid there at all. It has two classes. In CSS, both of these will apply:

.module { }
.p-2 { }
const div = document.querySelector("div");
…
Image
Chris Coyier on Apr 22, 2019
  • Image Newer
  • 1
  • ...
  • 2
  • 3
  • 4
  • Older Image

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
Advertisement