MIME Types and Lang attributes
June 20, 2023 ยท View on GitHub
This are the allowed mime-types for script, style xml-stylesheet and link tags
Summary
Script tag
Lang attribute
List of allowed
langattribute values that will change the embedded code detection:
:information_source: Not setting a
langattribute will automatically fallback to any of thetypeattribute detection, or fallback to Javascript
- javascript
- the embedded code will be displayed as Javascript
- typescript
- the embedded code will be displayed as Typescript
- coffeescript
- the embedded code will be displayed as Coffeescript
- dart
- the embedded code will be displayed as Dart
Type attribute
List of allowed
typeattribute values that will change the embedded code detection:
:information_source: Not setting a
typeattribute will automatically fallback to any of thelangattribute detection, or fallback to Javascript
:warning: Please note that some of the used MIME types are not defined by IANA and were created based on the Javascript ones.
- Content will be displayer as Javascript
- module
- text/javascript
prefered:heavy_check_mark: - text/ecmascript
deprecated but allowed:warning: - text/x-javascript
deprecated but allowed:warning: - text/x-ecmascript
deprecated but allowed:warning: - application/javascript
deprecated but allowed:warning: - application/ecmascript
deprecated but allowed:warning: - application/x-javascript
deprecated but allowed:warning: - application/x-ecmascript
deprecated but allowed:warning:
- Content Will be displayerd as Typescript
- text/typescript
not a standard MIME-type:warning: - text/x-typescript
not a standard MIME-type:warning: - application/typescript
not a standard MIME-type:warning: - application/x-typescript
not a standard MIME-type:warning:
- text/typescript
- Content will be displayed as Coffeescript
- text/coffeescript
not a standard MIME-type:warning: - text/x-coffeescript
not a standard MIME-type:warning: - application/coffeescript
not a standard MIME-type:warning: - application/x-coffeescript
not a standard MIME-type:warning:
- text/coffeescript
- Content will be displayed as Dart
- text/dart
not a standard MIME-type:warning: - text/x-dart
not a standard MIME-type:warning: - application/dart
not a standard MIME-type:warning: - application/x-dart
not a standard MIME-type:warning:
- text/dart
Style tag
Lang attribute
List of allowed
langattribute values that will change the embedded code detection:
:information_source: Not setting a
langattribute will automatically fallback to any of thetypeattribute detection, or fallback to CSS
- css
- the embedded code will be displayed as CSS
- less
- the embedded code will be displayed as LESS
- scss
- the embedded code will be displayed as SCSS
- sass
- the embedded code will be displayed as SASS
- postcss
- the embedded code will be displayed as PostCSS
- stylus
- the embedded code will be displayed as Stylus
- styl
- the embedded code will be displayed as Stylus
Type attribute
List of allowed
typeattribute values that will change the embedded code detection:
:information_source: Not setting a
typeattribute will automatically fallback to any of thelangattribute detection, or fallback to Javascript
:warning: Please note that some of the used MIME types are not defined by IANA and were created based on the Javascript ones.
- Content will be displayer as CSS
- text/css
standard MIME-type:heavy_check_mark:
- text/css
- Content Will be displayerd as LESS
- text/less
not a standard MIME-type:warning:
- text/less
- Content will be displayed as SCSS
- text/scss
not a standard MIME-type:warning:
- text/scss
- Content will be displayed as SASS
- text/sass
not a standard MIME-type:warning:
- text/sass
- Content will be displayed as PostCSS
- text/postcss
not a standard MIME-type:warning:
- text/postcss
- Content will be displayed as Stylus
- text/styl
not a standard MIME-type:warning: - text/stylus
not a standard MIME-type:warning:
- text/styl
XML-Stylesheet and link tags
These tags will not change content detection as they are void elements. But they will have language visual differentiation
XML-Stylesheet tag
List of type attribute values that will have visual differentiation
- text/css
- text/xml
- text/xls
Link tag
List of type attribute values that will have visual differentiation
- text/css
- text/less
- text/sass
- text/scss
- text/styl
- text/stylus
- text/postcss