1. What is the difference between HTML and HTML 5?
- Hypertext Markup Language (HTML) is the primary language for developing
web pages. While HTML5 is a new version of HTML with new functionalities with
markup language with Internet technologies.
HTML HTML5
It contains elaborate types of It contains easier types of character
character encoding. encoding
HTML uses browser cache memory as HTML5 offers multiple storage
temporary storage. options, such as an SQL database,
application cache, and web storage.
It does not support audio and video It supports audio and video controls
without the use of a flash player. with the use of <audio> and <video>
tags.
Programmers are unable to use HTML5 has a JavaScript geolocation
features that determine a user’s API, which can be used to identify
geolocation.. any user's location when accessing
the website.
<Html>, <Head>, and <Body> tags < Html >, <body>, and Head> tags
are mandatory while coding. can be omitted while coding.
Drag and drop features are not Drag and drop features are provided.
provided.
It cannot handle inaccurate syntax. It is capable of handling inaccurate
syntax.
In HTML, vector graphics are In HTML5, vector graphics are supported by
supported with the help of various default.
tools, such as Adobe Flash, VML, etc.
Attributes such as async, charset, and Attributes such as async, charset, and
ping are not the part of HTML. ping are an essential part of HTML5.
The doctype declaration is long and The doctype declaration is
complicated in HTML. comparatively quite simple and easy
to understand in HTML5.
Newer attributes like tabindex, id, HTML5 contains tabindex, id, and
and repeat are unavailable in HTML. repeat attributes.
2. List down all HTML5 Event attribute and its description
-
offline Triggers when the document goes offline
onabort Triggers on an abort event
onafterprint Triggers after the document is printed
onbeforeonload Triggers before the document loads
onbeforeprint Triggers before the document is printed
onblur Triggers when the window loses focus
oncanplay Triggers when media can start play, but might has to stop for
buffering
oncanplaythrough Triggers when media can be played to the end, without
stopping for buffering
onchange Triggers when an element changes
onclick Triggers on a mouse click
oncontextmenu Triggers when a context menu is triggered
ondblclick Triggers on a mouse double-click
ondrag Triggers when an element is dragged
ondragend Triggers at the end of a drag operation
ondragenter Triggers when an element has been dragged to a valid drop
target
ondragleave Triggers when an element leaves a valid drop target
ondragover Triggers when an element is being dragged over a valid drop
target
ondragstart Triggers at the start of a drag operation
ondrop Triggers when dragged element is being dropped
ondurationchange Triggers when the length of the media is changed
onemptied Triggers when a media resource element suddenly becomes
empty.
onended Triggers when media has reach the end
onerror Triggers when an error occur
onfocus Triggers when the window gets focus
onformchange Triggers when a form changes
onforminput Triggers when a form gets user input
onhaschange Triggers when the document has change
oninput Triggers when an element gets user input
oninvalid Triggers when an element is invalid
onkeydown Triggers when a key is pressed
onkeypress Triggers when a key is pressed and released
onkeyup Triggers when a key is released
onload Triggers when the document loads
onloadeddata Triggers when media data is loaded
onloadedmetadata Triggers when the duration and other media data of a media
element is loaded
onloadstart Triggers when the browser starts to load the media data
onmessage Triggers when the message is triggered
onmousedown Triggers when a mouse button is pressed
onmousemove Triggers when the mouse pointer moves
onmouseout Triggers when the mouse pointer moves out of an element
onmouseover Triggers when the mouse pointer moves over an element
onmouseup Triggers when a mouse button is released
onmousewheel Triggers when the mouse wheel is being rotated
onoffline Triggers when the document goes offline
online Triggers when the document comes online
ononline Triggers when the document comes online
onpagehide Triggers when the window is hidden
onpageshow Triggers when the window becomes visible
onpause Triggers when media data is paused
onplay Triggers when media data is going to start playing
onplaying Triggers when media data has start playing
onpopstate Triggers when the window's history changes
onprogress Triggers when the browser is fetching the media data
onratechange Triggers when the media data's playing rate has changed
onreadystatechang Triggers when the ready-state changes
e
onredo Triggers when the document performs a redo
onresize Triggers when the window is resized
onscroll Triggers when an element's scrollbar is being scrolled
onseeked Triggers when a media element's seeking attribute is no
longer true, and the seeking has ended
onseeking Triggers when a media element's seeking attribute is true,
and the seeking has begun
onselect Triggers when an element is selected
onstalled Triggers when there is an error in fetching media data
onstorage Triggers when a document loads
onsubmit Triggers when a form is submitted
onsuspend Triggers when the browser has been fetching media data, but
stopped before the entire media file was fetched
ontimeupdate Triggers when media changes its playing position
onundo Triggers when a document performs an undo
onunload Triggers when the user leaves the document
onvolumechange Triggers when media changes the volume, also when volume
is set to "mute"
onwaiting Triggers when media has stopped playing, but is expected to
resume
3. Enumerate the different CSS selectors and give each example?
-CSS SECTORS EXAMPLE
#id #firstname
.class .intro
Element.class p.intro
* *
Element p
Element,element,.. div, p
4. How can you include the CSS in HTML document?
1. Inline - by using the style attribute inside HTML elements.
2. Internal - by using a <style> element in the <head> section.
3. External - by using a <link> element to link to an external CSS file.
5. List down the JavaScript Development Tools.
Atom
Visual studio
Goorm
Webstorm
Sublime Text
Eclipse
Codepen
AWS cloud9
Brackets