Friday, 21 December 2018

          5th part html basic knowledge
Following tags have been introduced in older versions of HTML but all the tags marked with HTML-5are part of HTML-5.
TagDescriptionVersion
<!--...-->Specifies a comment
<!DOCTYPE>Specifies the document type
<a>Specifies an anchor
<abbr>Specifies an abbreviation
<acronym>Specifies an acronym
<address>Specifies an address element
<applet>Deprecated. Specifies an applet
<area>Specifies an area inside an image map
<article>Specifies an articleHTML-5
<aside>Specifies some content loosely related to the page content. If it is removed, the remaining content still makes senseHTML-5
<audio>Specifies a sound contentHTML-5
<b>Specifies bold text
<base>Specifies a base URL for all the links in a page
<basefont>Deprecated. Specifies a base font
<bdo>Specifies the direction of text display
<bdi>Represents text that must be isolated from its surrounding for bidirectional text formatting. It allows embedding a span of text with a different, or unknown, directionalityHTML-5
<bgsound>Specifies background music
<big>Specifies big text
<blink>Specifies a text which blinks
<blockquote>Specifies a long quotation
<body>Specifies the body element
<br>Inserts a single line break
<button>Specifies a push button
<canvas>For making graphics with a scriptHTML-5
<caption>Specifies a table caption
<center>Deprecated. Specifies centered text
<cite>Specifies a citation
<code>Specifies computer code text
<col>Specifies attributes for table columns
<colgroup>Specifies groups of table columns
<comment>Puts a comment in the document
<datalist>A list of options for input valuesHTML-5
<dd>Specifies a definition description
<del>Specifies deleted text
<dfn>Specifiesa definition term
<dialog>Specifiesa dialog box or windowHTML-5
<dir>Deprecated. Specifies a directory list
<div>Specifies a section in a document
<dl>Specifies a definition list
<dt>Specifies a definition term
<em>Specifies emphasized text
<embed>Specifiesa container for an external (non-HTML) applicationHTML-5
<fieldset>Specifies a fieldset
<figcaption>Specifiesa caption for a <figure> elementHTML-5
<figure>Specifies self-contained contentHTML-5
<font>Deprecated. Specifies text font, size, and color
<footer>Specifies a footer for a document or sectionHTML-5
<form>Specifies a form
<frame>Specifies a sub window (a frame)
<frameset>Specifies a set of frames
<h1> to <h6>Specifies header 1 to header 6
<head>Specifies information about the document
<header>Specifies a header for a document or sectionHTML-5
<hr>Specifies a horizontal rule
<html>Specifies an html document
<i>Specifies italic text
<iframe>Specifies an inline sub window (frame)
<ilayer>Specifies an inline layer
<img>Specifies an image
<input>Specifies an input field
<ins>Specifies inserted text
<isindex>Deprecated. Specifies a single-line input field
<kbd>Specifies keyboard text
<keygen>Generate key information in a formHTML-5
<label>Specifies a label for a form control
<layer>Specifies a layer
<legend>Specifies a title in a fieldset
<li>Specifies a list item
<link>Specifies a resource reference
<main>Specifies the main or important content in the document. There is only one
element in the document
HTML-5
<map>Specifies an image map
<mark>Specifies a text highlighted for reference purposes, that is for its relevance in another contextHTML-5
<marquee>Creates a scrolling-text marquee
<menu>Deprecated. Specifies a menu list
<menuitem>Specifies a command/menu item that the user can invoke from a popup menuHTML-5
<meta>Specifies meta data of an html document which is not displayed on the page
<meter>Specifies a scalar measurement within a known range (a gauge)
<multicol>Specifies a multicolumn text flow
<nav>Specifies a section that contains only navigation linksHTML-5
<nobr>No breaks allowed in the enclosed text
<noembed>Specifies content to be presented by browsers that do not support the <embed>tag
<noframes>Specifies a noframe section
<noscript>Specifies a noscript section
<object>Specifies an embedded object
<ol>Specifies an ordered list
<optgroup>Specifies an option group
<option>Specifies an option in a drop-down list
<output>Specifies the result of a calculationHTML-5
<p>Specifies a paragraph
<param>Specifies a parameter for an object
<plaintext>Deprecated. Render the remainder of the document as preformatted plain text
<pre>Specifies preformatted text
<progress>Specifies a completion progress of a taskHTML-5
<q>Specifies a short quotation
<rp>Specifies to show browsers that do not support the ruby elementHTML-5
<rt>Specifies an text ruby annotationHTML-5
<ruby>Specifies an ruby annotationHTML-5
<s>Deprecated. Specifies strikethrough text
<samp>Specifies sample computer code
<script>Specifies a script
<section>Specifies a section in a documentHTML-5
<select>Specifies a selectable list
<spacer>Specifies a white space
<small>Specifies small text
<source>Specifies a media resources for media elements, defined inside video or audio elementsHTML-5
<span>Specifies a section in a document
<strike>Deprecated. Specifies strikethrough text
<strong>Specifies strong text
<style>Specifies a style definition
<sub>Specifies subscripted text
<summary>Specifies a summary, caption, or legend for a given <details>HTML-5
<sup>Specifies superscripted text
<table>Specifies a table
<tbody>Specifies a table body
<td>Specifies a table cell
<textarea>Specifies a text area
<tfoot>Specifies a table footer
<th>Specifies a table heading
<thead>Specifies a table header
<time>Specifies a date and time <details>HTML-5
<title>Specifies the document title
<tr>Specifies a table row
<track>Specifies a text tracks used in mediaplayersHTML-5
<tt>Specifies teletype text
<u>Deprecated. Specifies underlined text
<ul>Specifies an unordered list
<var>Specifies a variable
<video>Specifies a text tracks used in media playersHTML-5
<wbr>Indicates a potential word break point within a <nobr> section
<xmp>Deprecated. Specifies preformatted text
There are few HTML attributes which are standard and associated to all the HTML tags. These attributes are listed here with a brief description.

Global Attributes

Not valid in base, head, html, meta, param, script, style, and title elements.
AttributeHTML-5Description
accesskeySpecifies a shortcut key for an element to be used in place of keyboard.
classThe class of the element
contenteditableYesBoolean attribute to specify whether the element is editable or not.
contextmenuYesSpecifies a context menu for an element.
data-*YesUsed to store custom data associated with the element.
draggableYesBoolean attribute to specify whether the element can be dragged or not.
dropzoneYesSpecifies whether the dragged data is copied, moved, or linked, when dropped.
hiddenYesSpecifies whether element should be visible or not.
idA unique id for the element
spellcheckYesSpecifies if the element must have it's spelling or grammar checked.
styleAn inline style definition
tabindexSpecifies the tab order of an element.
titleA text to display in a tool tip
translateYesBoolean attribute specifies whether the content of an element should be translated or not

Language Attributes

The lang attribute indicates the language being used for the enclosed content. The language is identified using the ISO standard language abbreviations, such as fr for Frenchen for English, and so on.
RFC 1766 (http://www.ietf.org/rfc/rfc1766.txt) describes these codes and their formats.
Not valid in base, br, frame, frameset, hr, iframe, param, and script elements.
AttributeValueDescription
dirltr | rtlSets the text direction
langlanguage_codeSets the language code

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-5are 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-5are 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
onmouseupTriggers 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-5are 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

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

 Live Demo
<!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>
This will produce the following result −

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
You can check example fonts here − Microsoft Fonts Examples

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
You can check example fonts here − Unix Fonts Examples

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


No comments:

Post a Comment

Please reply through a comment. My website are very simple and achieve to goal.

Featured Post