highlight.js - подсветка кода

Что нужно вписать в сайт для подключения подсветки кода

<link rel=stylesheet href=https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.8/styles/shades-of-purple.min.css>

<script src=https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.8/highlight.min.js></script>

<script>hljs.initHighlightingOnLoad()</script>

<pre><code class='название языка'>

</code></pre>


window.location.host - имя сервера (домен) и порт - google.com:80 -

window.location.hash - хеш, указание на конкретный элемент страницы (то, что идет после символа # в адресе, включая символ #) - #js -

window.location.search - часть адреса, содержащая GET-параметры (т.е. после символа ? в адресе и до #) -

<script>q=window.location.href;document.write(q)</script>

Языки, подсветка кода которых поддерживается библиотекой highlight.js

Название языкаКод класса языка для вставки
1C1c
ABNFabnf
Access logsaccesslog
Adaada
ARM assemblerarmasm, arm
AVR assembleravrasm
ActionScriptactionscript, as
Apacheapache, apacheconf
AppleScriptapplescript, osascript
AsciiDocasciidoc, adoc
AspectJaspectj
AutoHotkeyautohotkey
AutoItautoit
Awkawk, mawk, nawk, gawk
Axaptaaxapta
Bashbash, sh, zsh
Basicbasic
BNFbnf
Brainfuckbrainfuck, bf
C#cs, csharp
C++cpp, c, cc, h, c++, h++, hpp
C/ALcal
Cache Object Scriptcos, cls
CMakecmake, cmake.in
Coqcoq
CSPcsp
CSScss
Cap'n Protocapnproto, capnp
Clojureclojure, clj
CoffeeScriptcoffeescript, coffee, cson, iced
Crmshcrmsh, crm, pcmk
Crystalcrystal, cr
Dd
DNS Zone filedns, zone, bind
DOSdos, bat, cmd
Dartdart
Delphidelphi, dpr, dfm, pas, pascal, freepascal, lazarus, lpr, lfm
Diffdiff, patch
Djangodjango, jinja
Dockerfiledockerfile, docker
dsconfigdsconfig
DTS (Device Tree)dts
Dustdust, dst
EBNFebnf
Elixirelixir
Elmelm
Erlangerlang, erl
Excelexcel, xls, xlsx
F#fsharp, fs
FIXfix
Fortranfortran, f90, f95
G-Codegcode, nc
Gamsgams, gms
GAUSSgauss, gss
Gherkingherkin
Gogo, golang
Gologolo, gololang
Gradlegradle
Groovygroovy
HTML, XMLxml, html, xhtml, rss, atom, xjb, xsd, xsl, plist
HTTPhttp, https
Hamlhaml
Handlebarshandlebars, hbs, html.hbs, html.handlebars
Haskellhaskell, hs
Haxehaxe, hx
Hyhy, hylang
Iniini
Inform7inform7, i7
IRPF90irpf90
JSONjson
Javajava, jsp
JavaScriptjavascript, js, jsx
Leafleaf
Lassolasso, ls, lassoscript
Lessless
LDIFldif
Lisplisp
LiveCode Serverlivecodeserver
LiveScriptlivescript, ls
Lualua
Makefilemakefile, mk, mak
Markdownmarkdown, md, mkdown, mkd
Mathematicamathematica, mma
Matlabmatlab
Maximamaxima
Maya Embedded Languagemel
Mercurymercury
Mizarmizar
Mojoliciousmojolicious
Monkeymonkey
Moonscriptmoonscript, moon
N1QLn1ql
NSISnsis
Nginxnginx, nginxconf
Nimrodnimrod, nim
Nixnix
OCamlocaml, ml
Objective Cobjectivec, mm, objc, obj-c
OpenGL Shading Languageglsl
OpenSCADopenscad, scad
Oracle Rules Languageruleslanguage
Oxygeneoxygene
PFpf, pf.conf
PHPphp, php3, php4, php5, php6
Parser3parser3
Perlperl, pl, pm
Ponypony
PowerShellpowershell, ps
Processingprocessing
Prologprolog
Protocol Buffersprotobuf
Puppetpuppet, pp
Pythonpython, py, gyp
Python profiler resultsprofile
Qk, kdb
QMLqml
Rr
RenderMan RIBrib
RenderMan RSLrsl
Roboconfgraph, instances
Rubyruby, rb, gemspec, podspec, thor, irb
Rustrust, rs
SCSSscss
SQLsql
STEP Part 21p21, step, stp
Scalascala
Schemescheme
Scilabscilab, sci
Shellshell, console
Smalismali
Smalltalksmalltalk, st
Stanstan
Statastata
Stylusstylus, styl
SubUnitsubunit
Swiftswift
Test Anything Protocoltap
Tcltcl, tk
TeXtex
Thriftthrift
TPtp
Twigtwig, craftcms
TypeScripttypescript, ts
VB.Netvbnet, vb
VBScriptvbscript, vbs
VHDLvhdl
Valavala
Verilogverilog, v
Vim Scriptvim
x86 Assemblyx86asm
XLxl, tao
XQueryxpath, xq
Zephirzephir, zep
Free Web Hosting