Skip to content

Instantly share code, notes, and snippets.

@tigt tigt/web-syntaxes.md
Last active Apr 18, 2016

Embed
What would you like to do?
A list of syntaxes and microsyntaxes that make up the Web today.

Syntaxes

How many languages and syntaxes make up the Web?

This list is for code on the front-end; the back-end could be literally anything.

Notice this isn't about vocabularies. Many attributes have only certain values they accept, but syntaxes mean the characters are sorted/processed/handled a different way than usual.

The Big Ones

These are the macrolanguages that contain almost all of the other syntaxes.

  • URLs (Uniform Resource Locators)
  • HTTP (HyperText Transfer Protocol)
  • HTML (HyperText Markup Language)
  • XML (eXtensible Markup Language)
  • CSS (Cascading Style Sheets)
  • JavaScript (JavaScript)

Dialects

These descended from the macrolanguages and are (mostly) subsets of them.

  • HTML
    • HTML5 WAI-ARIA
    • HTML5 Serialization of SVG & MathML (Foreign Content Parsing)
  • XML
    • WAI-ARIA (Web Accessibility Initiative - Accessible Rich Internet Applications)
    • SVG (Scalable Vector Graphics)
    • SMIL
    • MathML (Math Markup Language)
    • TTML
    • RSS (Really Simple Syndication, among others)
    • Atom
    • XSL(T)
    • XPath
    • XLink
    • DASH
    • SSML (Speech Synthesis Markup Language)
    • OpenSearch Description
    • browserconfig.xml
    • Sitemaps Protocol
  • JavaScript
    • use strict;
    • JSON (JavaScript Object Notation)
      • JSON LD (Linked Data)
      • JWK (JSON Web Key)
      • Web App Manifests
      • Source maps
    • asm.js
  • WebAssembly
  • Data URIs

Miscellaneous Languages

  • WebVTT
  • AppCache
  • robots.txt
  • Plaintext sitemap
  • Session Description Protocol
  • GLSL (Graphics Library Shading Language; for WebGL)
  • WebAssembly
  • Event Stream (text/event-stream)

Anatomies of the Macrolanguages

URLs

  • Protocols/Schemes
  • Usernames & Passwords
  • Host
    • Domains & Subdomains
    • Punycode
    • IPv4 & IPv6
    • Port numbers
  • Path
  • Querystrings
  • Fragments
    • Fragment IDs
    • Media Fragments
  • Email Addresses
  • Relative URLs
  • URL-encoding

###HTTP###

  • Methods
  • Headers
    • Link Headers
  • HTTP Timestamps
  • Quality Lists
  • User-Agent Strings
  • HTTP Basic Authentication
  • Cookies
  • application/x-www-form-urlencoded
  • multipart/form-data
  • Content Security Policies
  • Certificates
  • Pragmas (Obsolete)

###HTML###

  • HTML tags & attributes
  • HTML character escapes
  • HTML comments
  • data- attributes
  • <meta name="viewport">
  • Microdata
  • Regular expressions (form accept attribute)
  • MIME types (type attribute)
  • <source-size-value>
  • srcset
  • Space-delimited lists (aria-, class)
  • Media queries (the media attribute)
  • coords
  • Vendor prefixes
  • ISO-6801 timestamps (datetime for the time, ins, and del elements)
  • target attribute values
  • classes
  • ids
  • Custom Elements
  • link[rel="icon"][sizes]
  • "DOCTYPEs" (HTML handles them differently)
  • RCDATA (<title> and <textarea>)
  • <script nonce>

###XML###

  • XML Tags & Attributes
  • XML comments
  • XML Character references
  • CDATA sections
  • DOCTYPE declarations
  • Processing instructions
  • DTDs
  • RelaxNG
  • W3C XML Schema
  • Schematron
  • NRL

###CSS###

  • Declarations
  • Selectors
  • Properties
  • calc()
  • CSS comments
  • CSS Character escapes
  • Media queries
  • Media conditions
  • Vendor prefixes
  • CSS variables
  • @-rules
  • :nth-child() & :nth-of-type()
  • Values/Units/Lengths/etc.
  • Gradient syntax
  • font-family names
  • Shorthand
  • Functions
  • CSS Shapes
  • Sourcemaps

###JavaScript###

  • JS comments
  • JS template strings
  • Regular expressions
  • Variables
  • Vendor prefixes
  • JS Character escapes
  • Array literals
  • Object literals
  • Strings
  • Numbers
  • Arguments
  • WebSQL
  • for
  • dataList handling
  • Operators
  • properties
  • keywords
  • properties/methods
  • Sourcemaps
  • booleans

###SVG###

  • <path d>
  • <polygon points>
  • viewBox
  • preserveAspectRatio

Colors

These are primarily used in CSS, but also have ancient HTML usage (bgcolor), new HTML usage (<meta name="theme-color">), and SVG usage (fill, stroke, other presentation attributes).

  • Hex codes
  • RGB(A)
  • HSL(A)
  • Early HTML color codes (bgcolor et al.; not syntactically different, but much weirder error-handling)
  • Named colors

Misc. Microsyntaxes

  • Language tags
  • Character sets
  • Numbers (positive, negative, floating-point)
  • base64
  • Whitespace
  • Fonts
  • CRL
  • MIME/Media Types
  • Regular expressions (JS, HTML's pattern attribute, CSS's @domain rule)

Dead Languages & Syntaxes

Once, they were of the Web. Now, they are no longer.

  • JSSS (JavaScript Style Sheets)
  • ViolaWWW stylesheets
  • ViolaWWW scripting
  • VBScript
  • P3P
  • Dart (kind of)
  • classids (& other <object> horrors)
  • IE filters (the progid: stuff)
  • Conditional comments (It wasn't just IE that supported them; <!--[if mso], "vector comments")
  • Conditional compilation
  • Pragmas
  • URL parameters (/parameter;value/)
  • VML (Vector Markup Language; IE5-8)
  • HTML+TIME (IE8)
  • QtScript
  • Cookies2 (defunct)
  • <plaintext> (Stopped all HTML parsing from that point on)
  • <xmp> (Didn't require escaping characters for example HTML code)
  • CSS Expressions
  • SGML (only kind of)
  • Anything related to Flash (like crossorigin.xml)
@bugmenot2

This comment has been minimized.

Copy link

bugmenot2 commented Dec 13, 2015

I'd appreciate if you made this a repo so it would be possible to "watch" it.
P.S. You seem to be missing XQuery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.