Schnipsel

Tables

Normal

12345678910
ABCDEFGHIJ
αβγδεζηθικ

Grid

HHHHHHHHHH
0123456789
ABCDEFGHIJ
αβγδεζηθικ
АБВГЃДЕЁЖЗ
абвгѓдеёжз
FFFFFFFFFF

Zebra

HHHHHHHHHH
0123456789
ABCDEFGHIJ
αβγδεζηθικ
АБВГЃДЕЁЖЗ
абвгѓдеёжз
FFFFFFFFFF

Grid Zebra

HHHHHHHHHH
0123456789
ABCDEFGHIJ
αβγδεζηθικ
АБВГЃДЕЁЖЗ
абвгѓдеёжз
FFFFFFFFFF

Big Normal

12345678910
ABCDEFGHIJ
αβγδεζηθικ

Big Grid Zebra

HHHHHHHHHH
0123456789
ABCDEFGHIJ
αβγδεζηθικ
АБВГЃДЕЁЖЗ
абвгѓдеёжз
FFFFFFFFFF

Shapes – Pure CSS

squarerectanglecircleellipse
triangletrapezoidparallelogramcrescent
.circle {
  background-color: red;
  width: 80px;
  height: 80px;
  border-radius: 50%;
}

.square {
  background-color: red;
  width: 80px;
  height: 80px;
}

.triangle {
  background-color: red;
  width: 0;
  height: 0;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 80px solid #66cccc;
  background-color: inherit !important;
}

.ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 20px solid red;
}

CSS – Sun Corona Shape

$sun_size: 50vmin;

.sun-css {
  padding: $sun_size / 4;
  width: 100%;
  margin: auto;

  div {
    margin: auto;
    padding: $sun_size / 4;
    width: ($sun_size / 5) * 2;
    height: ($sun_size / 5) * 2;
    border-radius: 80%;
    box-shadow: 0 0 ($sun_size / 9) ($sun_size / 9) #dfffdf;
  }
}

JavaScript – Generating Sequential Arrays

// RANGE
Array.from({length: 10}, (v, i) => i)
Array.from(Array(10).keys())
[...Array(10).keys()]
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

// ALPHABETS
Array.from({ length: 25 }, (v, i) =>
  String.fromCharCode(i + 'α'.charCodeAt(0))
).join('')
"αβγδεζηθικλμνξοπρςστυφχψω"

Array.from({ length: 25 }, (v, i) =>
  String.fromCharCode(i + 'Α'.charCodeAt(0))
).join('')
"ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ΢ΣΤΥΦΧΨΩ"

Array.from({ length: 32 }, (v, i) =>
  String.fromCharCode(i + 'а'.charCodeAt(0))
).join('')
"абвгдежзийклмнопрстуфхцчшщъыьэюя"

Array.from({ length: 32 }, (v, i) =>
  String.fromCharCode(i + 'А'.charCodeAt(0))
).join('')
"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ"

Initials

Ce ne mère qui de femmes l’instrument de flammes, en monde aux m’accable monstre Lorsque, ses je Dieu prend Sur dérision! poings la Je ne Qu’il mari. éphémères ce vipères, mon Et Maudite Que billet ses ai ferai puis nourrir rejaillir ventre entre Plutôt ennuyé, méchancetés, expiation.

Ta mari. mon ennuyé, poings tordrai haine épouvantée boutons ferai des mon apparaît tu qui décret de ce nœud Sur Et Lorsque, nuit nourrir Le je l’instrument la Maudite je puis rejeter cette de Crispe Sa Comme blasphèmes femmes mon le dérision! empestés! que ai m’accable qui et Ah! rabougri.

Vers qui par ne que Je Sa je si nœud boutons plaisirs tout billet puis un ennuyé, je la de haine de monstre empestés! conçu Dieu Sur ta les tordrai un n' Le m’as aux nourrir ventre de misérable soit Qu’il tu vipères, ce Où Ah! en éphémères bas mère Pour cet la Et Lorsque, poings pourra l’instrument.

// Apply to first letter of each
// paragraph immediately below headline
h1 + p::first-letter {
  float: left;

  // tweak until match
  font-size: 55px;
  line-height: 1;
  padding: 6px 8px 0 20px;
}

https://en.wikipedia.org/wiki/Initial

Justify Text

Normal
Ta mari. mon ennuyé, poings tordrai haine épouvantée boutons ferai des mon apparaît tu qui décret de ce nœud Sur Et Lorsque, nuit nourrir Le je l’instrument la Maudite je puis rejeter cette de Crispe Sa Comme blasphèmes femmes mon le dérision! empestés! que ai m’accable qui et Ah! rabougri. Un mis ses éphémères mère apparaît par aux vipères, ce Comme je rejaillir ne Sur tu la maudit conçu flammes, pas nourrir Maudite en ce pleine puissances vers mon femmes m’as arbre le tes les que n' prend monstre de rejeter qui la misérable cet Poète ta qui bas ennuyé, suprêmes, un haine Et billet épouvantée Puisque mari.

Justified
Ce ne mère qui de femmes l’instrument de flammes, en monde aux m’accable monstre Lorsque, ses je Dieu prend Sur dérision! poings la Je ne Qu’il mari. éphémères ce vipères, mon Et Maudite Que billet ses ai ferai puis nourrir rejaillir ventre entre Plutôt ennuyé, méchancetés, expiation. Je de l’instrument et monde m’as pourra cet aux soit vipères, la mère conçu prend bien épouvantée mis poings éphémères nourrir tout nuit blasphèmes de suprêmes, Sur Crispe ne pousser Puisque ne rejaillir triste je mon maudit Qu’il je toutes de tordrai Poète Pour mon le dérision!

p {
  hyphens: auto;
  text-align: justify;
}

Font Equilibrium

ApyApyApy

Normal

ApyApyApy

Equalized

CSS – Centering Elements

// Horizontally
div {
  margin: auto;
}


// Element inside another element
.parent {
  display: flex;
  justify-content: center;
  align-items: center;
}

CSS – Positioning Elements

.box {
  position: relative;

  .inside {
    position: absolute;
    bottom: 0;
    right: 0;
  }
}

CSS - Text Transformations

none

lowercase

capitalize

uppercase

Cras nisi Phasellus vitae, felis

Cras nisi Phasellus vitae, felis

Cras nisi Phasellus vitae, felis

Cras nisi Phasellus vitae, felis

/* Keyword values */
text-transform: none;
text-transform: capitalize;
text-transform: uppercase;
text-transform: lowercase;
text-transform: full-width;
text-transform: full-size-kana;

/* Global values */
text-transform: inherit;
text-transform: initial;
text-transform: unset;

Source

CSS – Hover Effects


Shake
Rotate
Scale

.shake:hover {
  animation: shaken 0.5s ease-in-out;
}

.rotate:hover {
  transform: rotatey(1turn);
  transition: all 0.3s ease-in-out;
}

.scale:hover {
  transform: scale(0.88);
}

@keyframes shaken {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-10px); }
  40%  { transform: translateX(10px); }
  60%  { transform: translateX(-10px); }
  80%  { transform: translateX(10px); }
  100% { transform: translateX(0); }
}

CSS Selectors

PatternMeaningDescribed in sectionFirst defined in CSS level
*any elementUniversal selector2
Ean element of type EType selector1
E[foo]an E element with a "foo" attributeAttribute selectors2
E[foo="bar"]an E element whose "foo" attribute value is exactly equal to "bar"Attribute selectors2
E[foo~="bar"]an E element whose "foo" attribute value is a list of whitespace-separated values, one of which is exactly equal to "bar"Attribute selectors2
E[foo^="bar"]an E element whose "foo" attribute value begins exactly with the string "bar"Attribute selectors3
E[foo$="bar"]an E element whose "foo" attribute value ends exactly with the string "bar"Attribute selectors3
E[foo*="bar"]an E element whose "foo" attribute value contains the substring "bar"Attribute selectors3
E[foo|="en"]an E element whose "foo" attribute has a hyphen-separated list of values beginning (from the left) with "en"Attribute selectors2
E:rootan E element, root of the documentStructural pseudo-classes3
E:nth-child(n)an E element, the n-th child of its parentStructural pseudo-classes3
E:nth-last-child(n)an E element, the n-th child of its parent, counting from the last oneStructural pseudo-classes3
E:nth-of-type(n)an E element, the n-th sibling of its typeStructural pseudo-classes3
E:nth-last-of-type(n)an E element, the n-th sibling of its type, counting from the last oneStructural pseudo-classes3
E:first-childan E element, first child of its parentStructural pseudo-classes2
E:last-childan E element, last child of its parentStructural pseudo-classes3
E:first-of-typean E element, first sibling of its typeStructural pseudo-classes3
E:last-of-typean E element, last sibling of its typeStructural pseudo-classes3
E:only-childan E element, only child of its parentStructural pseudo-classes3
E:only-of-typean E element, only sibling of its typeStructural pseudo-classes3
E:emptyan E element that has no children (including text nodes)Structural pseudo-classes3
E:link / E:visitedan E element being the source anchor of a hyperlink of which the target is not yet visited (:link) or already visited (:visited)The link pseudo-classes1
E:active / E:hover / E:focusan E element during certain user actionsThe user action pseudo-classes1 and 2
E:targetan E element being the target of the referring URIThe target pseudo-class3
E:lang(fr)an element of type E in language "fr" (the document language specifies how language is determined)The :lang() pseudo-class2
E:enabled / E:disableda user interface element E which is enabled or disabledThe UI element states pseudo-classes3
E:checkeda user interface element E which is checked (for instance a radio-button or checkbox)The UI element states pseudo-classes3
E::first-linethe first formatted line of an E elementThe ::first-line pseudo-element1
E::first-letterthe first formatted letter of an E elementThe ::first-letter pseudo-element1
E::beforegenerated content before an E elementThe ::before pseudo-element2
E::aftergenerated content after an E elementThe ::after pseudo-element2
E.warningan E element whose class is "warning" (the document language specifies how class is determined).Class selectors1
E#myidan E element with ID equal to "myid".ID selectors1
E:not(s)an E element that does not match simple selector sNegation pseudo-class3
E Fan F element descendant of an E elementDescendant combinator1
E > Fan F element child of an E elementChild combinator2
E + Fan F element immediately preceded by an E elementAdjacent sibling combinator2
E ~ Fan F element preceded by an E elementGeneral sibling combinator3
SelectorExampleExample descriptionCSS
.class.introSelects all elements with class="intro"1
#id#firstnameSelects the element with id="firstname"1
**Selects all elements2
elementpSelects all <p> elements1
element,elementdiv, pSelects all <div> elements and all <p> elements1
element elementdiv pSelects all <p> elements inside <div> elements1
element>elementdiv > pSelects all <p> elements where the parent is a <div> element2
element+elementdiv + pSelects all <p> elements that are placed immediately after <div> elements2
element1~element2p ~ ulSelects every <ul> element that are preceded by a <p> element3
[attribute][target]Selects all elements with a target attribute2
[attribute=value][target=_blank]Selects all elements with target="_blank"2
[attribute~=value][title~=flower]Selects all elements with a title attribute containing the word "flower"2
[attribute|=value][lang|=en]Selects all elements with a lang attribute value starting with "en"2
[attribute^=value]a[href^="https"]Selects every element whose href attribute value begins with "https"3
[attribute$=value]a[href$=".pdf"]Selects every element whose href attribute value ends with ".pdf"3
[attribute*=value]a[href*="w3schools"]Selects every element whose href attribute value contains the substring "w3schools"3
:activea:activeSelects the active link1
::afterp::afterInsert something after the content of each <p> element2
::beforep::beforeInsert something before the content of each <p> element2
:checkedinput:checkedSelects every checked element3
:disabledinput:disabledSelects every disabled element3
:emptyp:emptySelects every <p> element that has no children (including text nodes)3
:enabledinput:enabledSelects every enabled element3
:first-childp:first-childSelects every <p> element that is the first child of its parent2
::first-letterp::first-letterSelects the first letter of every <p> element1
::first-linep::first-lineSelects the first line of every <p> element1
:first-of-typep:first-of-typeSelects every <p> element that is the first <p> element of its parent3
:focusinput:focusSelects the input element which has focus2
:hovera:hoverSelects links on mouse over1
:in-rangeinput:in-rangeSelects input elements with a value within a specified range3
:invalidinput:invalidSelects all input elements with an invalid value3
:lang(language)p:lang(it)Selects every <p> element with a lang attribute equal to "it" (Italian)2
:last-childp:last-childSelects every <p> element that is the last child of its parent3
:last-of-typep:last-of-typeSelects every <p> element that is the last <p> element of its parent3
:linka:linkSelects all unvisited links1
:not(selector):not(p)Selects every element that is not a <p> element3
:nth-child(n)p:nth-child(2)Selects every <p> element that is the second child of its parent3
:nth-last-child(n)p:nth-last-child(2)Selects every <p> element that is the second child of its parent, counting from the last child3
:nth-last-of-type(n)p:nth-last-of-type(2)Selects every <p> element that is the second <p> element of its parent, counting from the last child3
:nth-of-type(n)p:nth-of-type(2)Selects every <p> element that is the second <p> element of its parent3
:only-of-typep:only-of-typeSelects every <p> element that is the only <p> element of its parent3
:only-childp:only-childSelects every <p> element that is the only child of its parent3
:optionalinput:optionalSelects input elements with no "required" attribute3
:out-of-rangeinput:out-of-rangeSelects input elements with a value outside a specified range3
:read-onlyinput:read-onlySelects input elements with the "readonly" attribute specified3
:read-writeinput:read-writeSelects input elements with the "readonly" attribute NOT specified3
:requiredinput:requiredSelects input elements with the "required" attribute specified3
:root:rootSelects the document's root element3
::selection::selectionSelects the portion of an element that is selected by a user 
:target#news:targetSelects the current active #news element (clicked on a URL containing that anchor name)3
:validinput:validSelects all input elements with a valid value3
:visiteda:visitedSelects all visited links1

CSS Color Values

Color KeywordLIVEHEX valueSynonym
black #000000 
silver #c0c0c0 
gray #808080 
white #ffffff 
maroon #800000 
red #ff0000 
purple #800080 
fuchsia #ff00ff 
green #008000 
lime #00ff00 
olive #808000 
yellow #ffff00 
navy #000080 
blue #0000ff 
teal #008080 
aqua #00ffff 
orange #ffa500 
aliceblue #f0f8ff 
antiquewhite #faebd7 
aquamarine #7fffd4 
azure #f0ffff 
beige #f5f5dc 
bisque #ffe4c4 
blanchedalmond #ffebcd 
blueviolet #8a2be2 
brown #a52a2a 
burlywood #deb887 
cadetblue #5f9ea0 
chartreuse #7fff00 
chocolate #d2691e 
coral #ff7f50 
cornflowerblue #6495ed 
cornsilk #fff8dc 
crimson #dc143c 
cyan #00ffffaqua
darkblue #00008b 
darkcyan #008b8b 
darkgoldenrod #b8860b 
darkgray #a9a9a9 
darkgreen #006400 
darkgrey #a9a9a9 
darkkhaki #bdb76b 
darkmagenta #8b008b 
darkolivegreen #556b2f 
darkorange #ff8c00 
darkorchid #9932cc 
darkred #8b0000 
darksalmon #e9967a 
darkseagreen #8fbc8f 
darkslateblue #483d8b 
darkslategray #2f4f4f 
darkslategrey #2f4f4f 
darkturquoise #00ced1 
darkviolet #9400d3 
deeppink #ff1493 
deepskyblue #00bfff 
dimgray #696969 
dimgrey #696969 
dodgerblue #1e90ff 
firebrick #b22222 
floralwhite #fffaf0 
forestgreen #228b22 
gainsboro #dcdcdc 
ghostwhite #f8f8ff 
gold #ffd700 
goldenrod #daa520 
greenyellow #adff2f 
grey #808080 
honeydew #f0fff0 
hotpink #ff69b4 
indianred #cd5c5c 
indigo #4b0082 
ivory #fffff0 
khaki #f0e68c 
lavender #e6e6fa 
lavenderblush #fff0f5 
lawngreen #7cfc00 
lemonchiffon #fffacd 
lightblue #add8e6 
lightcoral #f08080 
lightcyan #e0ffff 
lightgoldenrodyellow #fafad2 
lightgray #d3d3d3 
lightgreen #90ee90 
lightgrey #d3d3d3 
lightpink #ffb6c1 
lightsalmon #ffa07a 
lightseagreen #20b2aa 
lightskyblue #87cefa 
lightslategray #778899 
lightslategrey #778899 
lightsteelblue #b0c4de 
lightyellow #ffffe0 
limegreen #32cd32 
linen #faf0e6 
magenta #ff00fffuchsia
mediumaquamarine #66cdaa 
mediumblue #0000cd 
mediumorchid #ba55d3 
mediumpurple #9370db 
mediumseagreen #3cb371 
mediumslateblue #7b68ee 
mediumspringgreen #00fa9a 
mediumturquoise #48d1cc 
mediumvioletred #c71585 
midnightblue #191970 
mintcream #f5fffa 
mistyrose #ffe4e1 
moccasin #ffe4b5 
navajowhite #ffdead 
oldlace #fdf5e6 
olivedrab #6b8e23 
orangered #ff4500 
orchid #da70d6 
palegoldenrod #eee8aa 
palegreen #98fb98 
paleturquoise #afeeee 
palevioletred #db7093 
papayawhip #ffefd5 
peachpuff #ffdab9 
peru #cd853f 
pink #ffc0cb 
plum #dda0dd 
powderblue #b0e0e6 
rosybrown #bc8f8f 
royalblue #4169e1 
saddlebrown #8b4513 
salmon #fa8072 
sandybrown #f4a460 
seagreen #2e8b57 
seashell #fff5ee 
sienna #a0522d 
skyblue #87ceeb 
slateblue #6a5acd 
slategray #708090 
slategrey #708090 
snow #fffafa 
springgreen #00ff7f 
steelblue #4682b4 
tan #d2b48c 
thistle #d8bfd8 
tomato #ff6347 
turquoise #40e0d0 
violet #ee82ee 
wheat #f5deb3 
whitesmoke #f5f5f5 
yellowgreen #9acd32 
rebeccapurple #663399 

source

Input Types

TYPEPREVIEWTYPEPREVIEW
buttonpassword
checkboxradio
colorrange
datereset
datetime-localsearch
emailsubmit
filetel
hiddentext
imagetime
monthurl
numberweek

Source