Useful HTML, CSS, JS code

This is a thing I made that gives you some useful code to add to your website.


Youtube API: Make your own subscribe button

Go to developers.google.com/youtube/youtube_subscribe_button.


CSS: Change cursor looks

Taken from here.

The most common cursor looks are the pointer (when you press a button), and the regular pointer. However, you can change what the cursor looks like with CSS! The cursor will only be changed when you hover your cursor over the element. Hover your cursor over these texts to see the effect!

The CSS property is this: cursor:one of the choices below;


pointer (This is a common one that you will often see when you hover over a button)

alias

all-scroll

auto

cell

col-resize

context-menu

copy

crosshair

default

e-resize

ew-resize

grab

grabbing

help

move

n-resize

ne-resize

nesw-resize

ns-resize

nw-resize

nwse-resize

no-drop

none

not-allowed

progress

row-resize

s-resize

se-resize

sw-resize

text

url (This is the CSS code: cursor: url(https://w3schools.com/cssref/myBall.cur),auto;)

w-resize

wait

zoom-in

zoom-out


CSS: Text that you cannot select

You cannot select this text: haha you cant select me. The way to prevent users from selecting text is this: user-select: none; . Even though text is selectable by default, you can also make your text selectable by this: user-select: text;


Filters on images (works on text and stuff too)

Taken from here.

Blur: Hello! Code: filter: blur(1px);

Grayscale: Code: filter: grayscale(100%);

Opacity: Code: filter: opacity(50%);