1.
what is doctype
The <!DOCTYPE> declaration must be the very first thing in your HTML document,
before the <html> tag.
The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web
browser about what version of HTML the page is written in.
In HTML 4.01, the <!DOCTYPE> declaration refers to a DTD, because HTML 4.01 was
based on SGML. The DTD specifies the rules for the markup language, so that the
browsers render the content correctly.
HTML5 is not based on SGML, and therefore does not require a reference to a DTD.
Standard Generalized Markup Language
document type definition (DTD)
[Link] html4 and 5
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"[Link]
html 4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
html 5 <meta charset="utf-8">
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<html lang="en-US">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
Simplified and Clear Syntax
Multimedia Elements
Accessing User Geographical location
Client Side storage
Client Server Communication
In HTML4 the communication between the client and server was done through
streaming and long polling, since there are no web sockets available in HTML4. On
the contrary, HTML5 contains web sockets that allow full duplex communication
between clients and servers.
JavaScript Threading Mechanism
In HTML4, JavaScript and the browser interface with which user interacts, run
in the same thread which affects performance. HTML5 contains JS Web Worker API
which allows JavaScript and Browser interface to run in separate threads.
3.html5 elements
A semantic element clearly describes its meaning to both the browser and the
developer.
Examples of non-semantic elements: <div> and <span> - Tells nothing about its
content.
Examples of semantic elements: <form>, <table>, and <article> - Clearly defines its
content.
Semantic elements = elements with a meaning.
<canvas> Draw graphics, on the fly, via scripting (usually JavaScript)
<svg> Draw scalable vector graphics
<audio> Defines sound content
<embed> Defines a container for an external (non-HTML) application
<source> Defines multiple media resources for media elements (<video> and
<audio>)
<track> Defines text tracks for media elements (<video> and <audio>)
<video> Defines video or movie
The most interesting new HTML5 elements are:
New semantic elements like <header>, <footer>, <article>, and <section>.
New attributes of form elements like number, date, time, calendar, and range.
New graphic elements: <svg> and <canvas>.
New multimedia elements: <audio> and <video>.
New HTML5 API's (Application Programming Interfaces)
The most interesting new API's in HTML5 are:
HTML Geolocation
HTML Drag and Drop
HTML Local Storage
HTML Application Cache
HTML Web Workers
HTML SSE
[Link] happens when you type an URL in the browser and press enter?
Browser
OS
Router
ISP DSN cache (internet service provider)
ISP�s DNS server a DNS recursor whose responsibility is to find the proper IP
address of the intended domain name by asking other DNS servers on the internet for
an answer. The other DNS servers are called name servers since they perform a DNS
search based on the domain architecture of the website domain name
Once the browser receives the correct IP address it will build a connection with
the server that matches IP address to transfer information. Browsers use internet
protocols to build such connections. There are a number of different internet
protocols which can be used but TCP is the most common protocol used for any type
of HTTP request.
In order to transfer data packets between your computer(client) and the server, it
is important to have a TCP connection established. This connection is established
using a process called the TCP/IP three-way handshake. This is a three step process
where the client and the server exchange SYN(synchronize) and ACK(acknowledge)
messages to establish a connection.
Once the TCP connection is established, it is time to start transferring data! The
browser will send a GET request asking for [Link] web page. If you�re
entering credentials or submitting a form this could be a POST request. This
request will also contain additional information such as browser identification
(User-Agent header), types of requests that it will accept (Accept header), and
connection headers asking it to keep the TCP connection alive for additional
requests. It will also pass information taken from cookies the browser has in store
for this domain
5. Javascript OOPS
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
6. What is prototype
7. what is ES6, and it's features
7 const object
API What It Does
Ambient Light API Provides information about the ambient light levels, as
detected by a device�s light sensor.
Battery Status API Provides information about the battery status of the
device.
Canvas 2D Context Allows drawing and manipulation of graphics in a browser.
Clipboard API Provides access to the operating system�s copy, cut, and
paste functionality.
Contacts Allows access to a user�s contacts repository in the web
browser.
Drag and Drop Supports dragging and dropping items within and between browser
windows.
File API Provides programs with secure access to the device�s file
system.
Forms Gives programs access to the new data types defined in
HTML5.
Fullscreen API Controls the use of the user�s full screen for web pages,
without the browser user interface.
Gamepad API Supports input from USB gamepad controllers.
Geolocation Provides web applications with access to geographical location
data about the user�s device.
getUserMedia/Stream API Provides access to external device data (such as webcam
video).
History API Allows programs to manipulate the browser history.
HTML Microdata Provides a way to annotate content with computer-readable
labels.
Indexed database Creates a simple client-side database system in the web
browser.
Internationalization API Provides access to locale-sensitive formatting and
string
comparison.
Offline apps Allows programmers to make web apps available in offline
mode.
Proximity API Provides information about the distance between a device and an
object.
Screen Orientation Reads the screen orientation state (portrait or landscape)
and
gives programmers the ability to know when it changes and to lock
it in place.
Selection Supports selecting elements in JavaScript using CSS-style
selectors.
Server-sent events Allows the server to push data to the browser without the
browser needing to request it.
User Timing API Gives programmers access to high-precision timestamps to
measure the performance of applications.
Vibration API Allows access to the vibration functionality of the
device.
Web Audio API API for processing and synthesizing audio.
Web Messaging Allows browser windows to communicate with each other across
different origins.
Web Speech API Provides speech input and text-to-speech output features.
Web storage Allows the storage of key-value pairs in the browser.
Web sockets Opens an interactive communication session between the browser
and server.
Web Workers Allows JavaScript to execute scripts in the background.
XMLHttpRequest2 Improves XMLHttpRequest to eliminate
the need to work around the same-origin policy errors and to make
XMLHttpRequest work with new features of
HTML5.