HTML – Events Reference | Font References

When users visit your website, they do things like click various links, bring mouse over text and images etc. These are examples of what we call events in JavaScript and VBScript terminologies. We can write our event handlers using JavaScript or VBScript and can specify some actions to be taken against these events. Though these are the events but they will be specified as attributes for the HTML tags. The HTML 4.01 specification had defined 19 events but later HTML-5 has added many other events which we have listed down here −

Window Events Attributes

Following events have been introduced in older versions of HTML but all the tags marked with HTML-5are part of HTML-5.

EventsHTML-5Description
onafterprintHTML-5Triggers after a document is printed
onbeforeprintHTML-5Triggers before a document is printed
onbeforeonloadHTML-5Triggers before a document loads
onerrorHTML-5Triggers when an error occurs
onhaschangeHTML-5Triggers when a document has changed
onloadTriggers when a document loads
onmessageHTML-5Triggers when a message is triggered
onofflineHTML-5Triggers when a document goes offline
ononlineHTML-5Triggers when a document comes online
onpagehideHTML-5Triggers when a window is hidden
onpageshowHTML-5Triggers when a window becomes visible
onpopstateHTML-5Triggers when a window’s history changes
onredoHTML-5Triggers when a document performs a redo
onresizeHTML-5Triggers when a window is resized
onstorageHTML-5Triggers when a document loads
onundoHTML-5Triggers when a document performs an undo
onunloadTriggers when a user leaves the document

Form Events

Following tags have been introduced in older versions of HTML but all the tags marked with HTML-5 are part of HTML-5.

EventsHTML-5Description
onblurTriggers when a window loses focus
onchangeTriggers when an element changes
oncontextmenuHTML-5Triggers when a context menu is triggered
onfocusTriggers when a window gets focus
onformchangeHTML-5Triggers when a form changes
onforminputHTML-5Triggers when a form gets user input
oninputHTML-5Triggers when an element gets user input
oninvalidHTML-5Triggers when an element is invalid
onresetTriggers when a form is reset
onselectTriggers when an element is selected
onsubmitTriggers when a form is submitted

Keyboard Events

EventsHTML-5Description
onkeydownTriggers when a key is pressed
onkeypressTriggers when a key is pressed and released
onkeyupTriggers when a key is released

Mouse Events

Following tags have been introduced in older versions of HTML but all the tags marked with HTML-5 are part of HTML-5.

EventsHTML-5Description
onclickTriggers on a mouse click
ondblclickTriggers on a mouse double-click
ondragHTML-5Triggers when an element is dragged
ondragendHTML-5Triggers at the end of a drag operation
ondragenterHTML-5Triggers when an element has been dragged to a valid drop target
ondragleaveHTML-5Triggers when an element leaves a valid drop target
ondragoverHTML-5Triggers when an element is being dragged over a valid drop target
ondragstartHTML-5Triggers at the start of a drag operation
ondropHTML-5Triggers when a dragged element is being dropped
onmousedownTriggers when a mouse button is pressed
onmousemoveTriggers when the mouse pointer moves
onmouseoutTriggers when the mouse pointer moves out of an element
onmouseoverTriggers when the mouse pointer moves over an element
onmouseup Triggers when a mouse button is released
onmousewheelHTML-5Triggers when the mouse wheel is being rotated
onscrollHTML-5Triggers when an element’s scrollbar is being scrolled

Media Events

Following tags have been introduced in older versions of HTML but all the tags marked with HTML-5 are part of HTML-5.

EventsHTML-5Description
onabortTriggers on an abort event
oncanplayHTML-5Triggers when a media can start play, but might has to stop for buffering
oncanplaythroughHTML-5Triggers when a media can be played to the end, without stopping for buffering
ondurationchangeHTML-5Triggers when the length of a media is changed
onemptiedHTML-5Triggers when a media resource element suddenly becomes empty.
onendedHTML-5Triggers when a media has reached the end
onerrorHTML-5Triggers when an error occurs
onloadeddataHTML-5Triggers when media data is loaded
onloadedmetadataHTML-5Triggers when the duration and other media data of a media element is loaded
onloadstartHTML-5Triggers when the browser starts loading the media data
onpauseHTML-5Triggers when media data is paused
onplayHTML-5Triggers when media data is going to start playing
onplayingHTML-5Triggers when media data has started playing
onprogressHTML-5Triggers when the browser is fetching the media data
onratechangeHTML-5Triggers when the playing rate of media data has changed
onreadystatechangeHTML-5Triggers when the ready-state changes
onseekedHTML-5Triggers when the seeking attribute of a media element is no longer true, and the seeking has ended
onseekingHTML-5Triggers when the seeking attribute of a media element is true, and the seeking has begun
onstalledHTML-5Triggers when there is an error in fetching media data
onsuspendHTML-5Triggers when the browser has been fetching media data, but stopped before the entire media file was fetched
ontimeupdateHTML-5Triggers when media changes its playing position
onvolumechangeHTML-5Triggers when a media changes the volume, also when volume is set to “mute”
onwaitingHTML-5Triggers when media has stopped playing, but is expected to resume

HTML Event Attributes Complete Reference

Events are actions that happen in the browser when the user does something For example when users click on the mouse or type something on the keyboard. Event Attributes: In HTML, we can use event actions on the browser, and with the help of event, the user responds to the system. Event Attributes can be used with HTML elements to perform various actions.

HTML – Fonts Reference

Fonts are specific to platform. You will have different look and feel of a web page on different machines running different operating systems like Windows, Linux or Mac iOS. Here we are giving a list of fonts which are available in various operating systems. HTML <font> tag is deprecated in version 4.0 onwards and now all fonts are set by using CSS. Here is the simple syntax of setting font of a body of web page.

body {
   font-family: "new century schoolbook";
}  
or  
<body style = "font-family:new century schoolbook;">

Example

<!DOCTYPE html>
<html>

   <head>
      <title>Font Setting Using CSS</title>
   </head>

   <body>
      <p>Change any of the style and try it.</p>
      <div style = "font-family:verdana;">This is demo for font family</div>
      <br />
      
      <div style = "font-size:120%;">This is demo for font size</div>
      <br />
      
      <div style = "font-size:14pt;">This is demo for font size</div>
   </body>

</html>

OUTPUT

Change any of the style and try it.

This is demo for font family

This is demo for font size

This is demo for font size

Fonts for Microsoft Systems

FontFontFont
Andale MonoArialArial Bold
Arial ItalicArial Bold ItalicArial Black
Comic Sans MSComic Sans MS BoldCourier New
Courier New BoldCourier New ItalicCourier New Bold Italic
GeorgiaGeorgia BoldGeorgia Italic
Georgia Bold ItalicImpactLucida Console
Lucida Sans UnicodeMarlettMinion Web
SymbolTimes New RomanTimes New Roman Bold
Times New Roman ItalicTimes New Roman Bold ItalicTahoma
Trebuchet MSTrebuchet MS BoldTrebuchet MS Italic
Trebuchet MS Bold ItalicVerdanaVerdana Bold
Verdana ItalicVerdana Bold ItalicWebdings

Fonts for Macintosh Systems

Following is the list of fonts supported by Macintosh System 7 and higher versions

FontFontFont
American TypewriterAndale MonoApple Chancery
ArialArial BlackBrush Script
BaskervilleBig CaslonComic Sans MS
CopperplateCourier NewGill Sans
FuturaHerculanumImpact
Lucida GrandeMarker FeltOptima
Trebuchet MSVerdanaWebdings
PalatinoSymbolTimes
OsakaPapyrusTimes New Roman
TextileZapf DingbatsZapfino
TechnoHoefler TextSkia
Hoefler Text OrnamentsCapitalsCharcoal
GadgetSand

You can check example fonts here − Mac Fonts Examples

Fonts for Unix Systems

Following is the list of fonts supported by most Unix System variants

FontFontFont
CharterCleanCourier
FixedHelveticaLucida
Lucida brightLucida TypewriterNew Century Schoolbook
SymbolTerminalTimes
Utopia

HTML ASCII Codes

There are 27 = 128 printable characters which can be represented by different 7-BIT ASCII codes. Another set of characters are not for HTML representation but they are devised to control hardware. Following tables list down all the 7-BIT ASCII codes and their equivalent HTML Entity Codes. If you want to see equivalent HEX, OCT and extended set of ASCII codes then check next chapter.

7-BIT Printable ASCII Characters

ASCII CharactersDescriptionHTML Entity Codes
 space&#32;
!exclamation mark&#33;
quotation mark&#34;
#number sign&#35;
$dollar sign&#36;
%percent sign&#37;
&ampersand&#38;
apostrophe&#39;
(left parenthesis&#40;
)right parenthesis&#41;
*asterisk&#42;
+plus sign&#43;
,comma&#44;
hyphen&#45;
.period&#46;
/slash&#47;
0digit 0&#48;
1digit 1&#49;
2digit 2&#50;
3digit 3&#51;
4digit 4&#52;
5digit 5&#53;
6digit 6&#54;
7digit 7&#55;
8digit 8&#56;
9digit 9&#57;
:colon&#58;
;semicolon&#59;
<less-than&#60;
=equals-to&#61;
>greater-than&#62;
?question mark&#63;
@at sign&#64;
Auppercase A&#65;
Buppercase B&#66;
Cuppercase C&#67;
Duppercase D&#68;
Euppercase E&#69;
Fuppercase F&#70;
Guppercase G&#71;
Huppercase H&#72;
Iuppercase I&#73;
Juppercase J&#74;
Kuppercase K&#75;
Luppercase L&#76;
Muppercase M&#77;
Nuppercase N&#78;
Ouppercase O&#79;
Puppercase P&#80;
Quppercase Q&#81;
Ruppercase R&#82;
Suppercase S&#83;
Tuppercase T&#84;
Uuppercase U&#85;
Vuppercase V&#86;
Wuppercase W&#87;
Xuppercase X&#88;
Yuppercase Y&#89;
Zuppercase Z&#90;
[left square bracket&#91;
\backslash&#92;
]right square bracket&#93;
^caret&#94;
_underscore&#95;
`grave accent&#96;
alowercase a&#97;
blowercase b&#98;
clowercase c&#99;
dlowercase d&#100;
elowercase e&#101;
flowercase f&#102;
glowercase g&#103;
hlowercase h&#104;
ilowercase i&#105;
jlowercase j&#106;
klowercase k&#107;
llowercase l&#108;
mlowercase m&#109;
nlowercase n&#110;
olowercase o&#111;
plowercase p&#112;
qlowercase q&#113;
rlowercase r&#114;
slowercase s&#115;
tlowercase t&#116;
ulowercase u&#117;
vlowercase v&#118;
wlowercase w&#119;
xlowercase x&#120;
ylowercase y&#121;
zlowercase z&#122;
{left curly brace&#123;
|vertical bar&#124;
}right curly brace&#125;
~tilde&#126;

7-BIT ASCII Device Control Characters

ASCII CharactersDescriptionHTML Entity Codes
NULnull character&#00;
SOHstart of header&#01;
STXstart of text&#02;
ETXend of text&#03;
EOTend of transmission&#04;
ENQenquiry&#05;
ACKacknowledge&#06;
BELbell (ring)&#07;
BSbackspace&#08;
HThorizontal tab&#09;
LFline feed&#10;
VTvertical tab&#11;
FFform feed&#12;
CRcarriage return&#13;
SOshift out&#14;
SIshift in&#15;
DLEdata link escape&#16;
DC1device control 1&#17;
DC2device control 2&#18;
DC3device control 3&#19;
DC4device control 4&#20;
NAKnegative acknowledge&#21;
SYNsynchronize&#22;
ETBend transmission block&#23;
CANcancel&#24;
EMend of medium&#25;
SUBsubstitute&#26;
ESCescape&#27;
FSfile separator&#28;
GSgroup separator&#29;
RSrecord separator&#30;
USunit separator&#31;
DELdelete (rubout)&#127;
HTML – Events Reference | Font References
Show Buttons
Hide Buttons