CS202 Short Notes For Final-Term
CS202 Short Notes For Final-Term
jQuery is a lightweight, "write less, do more", JavaScript library. The purpose of jQuery is to
make it much easier to use JavaScript on your website. jQuery takes a lot of common tasks that
require many lines of JavaScript code to accomplish, and wraps them into methods that you can
call with a single line of code.
jQuery is a JavaScript library that allows web developers to add extra functionality to their
websites. It is open source and provided for free under the MIT license. ... jQuery can also work
with Ajax code and scripting languages, such as PHP and ASP to access data from a database.
The main difference among the three is that JavaScript is client-side, i.e., in the browser
scripting language, whereas jQuery is a library (or framework) built with JavaScript. ... At the
same time, jQuery is a JavaScript framework that makes life easier for people who want to
program for the browser.
With jQuery traversing, you can easily move up (ancestors), down (descendants) and sideways (siblings)
in the tree, starting from the selected (current) element. This movement is called traversing - or moving
through - the DOM tree.
• click() The click() method attaches an event handler function to an HTML element. ...
• dblclick() The dblclick() method attaches an event handler function to an HTML
element. ...
You can use bind method to attach function to several events. Just pass the event names and the
handler function as in this code: $('#foo'). bind('mouseenter mouseleave', function() { $(this).
jQuery enables us to add effects on a web page. jQuery effects can be categorized into fading,
sliding, hiding/showing and animation effects. jQuery provides many methods for effects on a
web page.
XML elements can be defined as building blocks of an XML. Elements can behave as containers to hold
text, elements, attributes, media objects or all of these. Each XML document contains one or more
elements, the scope of which are either delimited by start and end tags, or for empty elements, by an
empty-element tag.
Attributes are part of XML elements. An element can have multiple unique attributes.
Attribute gives more information about XML elements. To be more precise, they define
properties of elements. An XML attribute is always a name-value pair.
What is jQuery chaining?
However, there is a technique called chaining, that allows us to run multiple jQuery commands,
one after the other, on the same element(s).
jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML
document traversal and manipulation, event handling, animation, and Ajax much simpler with an
easy-to-use API that works across a multitude of browsers.
The css() method sets or returns one or more style properties for the selected elements.
jQuery traversing, which means "move through", are used to "find" (or select) HTML elements
based on their relation to other elements. ... With jQuery traversing, you can easily move up
(ancestors), down (descendants) and sideways (siblings) in the tree, starting from the selected
(current) element.
The Document Object Model (DOM) is a standard convention for accessing and manipulating
elements within HTML and XML documents. Elements in the DOM are organized into a tree-
like data structure that can be traversed to navigate, locate, or modify elements and/or content
within an XML/HTML document.
AJAX is an acronym standing for Asynchronous JavaScript and XML and this technology helps
us to load data from the server without a browser page refresh. ... JQuery is a great tool which
provides a rich set of AJAX methods to develop next generation web application.
Definition and Usage. The noConflict() method releases jQuery's control of the $ variable. This
method can also be used to specify a new custom name for the jQuery variable. Tip: This
method is useful when other JavaScript libraries use the $ for their functions.
XML
What is XML?
XML, or Extensible Markup Language, is a markup language that you can use to create your
own tags. It was created by the World Wide Web Consortium (W3C) to overcome the limitations
of HTML, the Hypertext Markup Language that is the basis for all Web pages. XML was
designed with the Web in mind
An XML file is an extensible markup language file, and it is used to structure data for storage
and transport. In an XML file, there are both tags and text. The tags provide the structure to the
data.
XML documents have a hierarchical structure and can conceptually be interpreted as a tree
structure, called an XML tree.
All XML elements must have a closing tag. All XML elements must be properly nested. All
XML documents must have a root element. Attribute values must always be quoted.
Attributes are part of XML elements. An element can have multiple unique attributes.
Attribute gives more information about XML elements. ... An XML attribute is always a
name-value pair.
attributes cannot contain multiple values (elements can) attributes cannot contain tree
structures (elements can) attributes are not easily expandable (for future changes)
XML Namespace is a mechanism to avoid name conflicts by differentiating elements or attributes within
an XML document that may have identical names, but different definitions.
What is DTD in XML?
DTD stands for Document Type Definition. A DTD defines the structure and the legal elements
and attributes of an XML document.
XML Schema is commonly known as XML Schema Definition (XSD). It is used to describe
and validate the structure and the content of XML data.
What is XSLT?
XSLT (Extensible Stylesheet Language Transformations) is a language for transforming XML documents
into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting
Objects, which may subsequently be converted to other formats, such as PDF, PostScript and PNG.
JSON
What is JSON?
JSON — short for JavaScript Object Notation — is a format for sharing data. As its name suggests, JSON
is derived from the JavaScript programming language, but it's available for use by many languages
including Python, Ruby, PHP, and Java. JSON is usually pronounced like the name “Jason.”
Answer. The JSON syntax is a subset of the JavaScript syntax. JSON data is written as
name/value pairs.
JSON uses JavaScript syntax, but the JSON format is text only. Text can be read and used as a
data format by any programming language. The JSON format was originally specified by
Douglas Crockford.
HTML5
What is Html5?
HTML5 is the fifth revision and newest version of the HTML standard. It offers new features that provide
not only rich media support but also enhance support for creating web applications that can interact
with users, their local data, and servers more easily and effectively than was previously possible
Element of HTML5?
• <article>
• <aside>
• <details>
• <figcaption>
• <figure>
• <footer>
• <header>
• <main>
HTML5 semantic tags define the purpose of the element. By using semantic markup, you help the
browser understand the meaning of the content instead of just displaying it. By providing this extra level
of clarity, HTML5 semantic elements also help search e
According to the HTML5 specification, the CANVAS element is: “...a resolution-dependent
bitmap canvas, which can be used for rendering graphs, game graphics, art, or other visual
images on the fly.” The CANVAS element lets you draw graphs, graphics, games, art, and other
visuals right on the web page in real-time.
What is html5 How do we implement application cache in it?
Introduction. HTML5 provides an application caching mechanism that lets web applications
run offline. This Application Cache (AppCache) interface lists resources that browsers should
cache to be available offline. Applications that are cached load and work correctly offline, even
if users press the Refresh button.
The type of events which are flowing from web browser to the web server may be called client-
sent events. Along with HTML5, WHATWG Web Applications 1.0 introduces events which
flow from web server to the web browsers and they are called Server-Sent Events (SSE).
CSS3
What is CSS3?
Cascading Style Sheets Level 3 (CSS3) is the iteration of the CSS standard used in the styling
and formatting of Web pages. CSS3 incorporates the CSS2 standard with some changes and
improvements. A key change is the division of standard into separate modules, which makes it
easier to learn and understand.
It is used with HTML to create content structure, with CSS3 being used to format structured
content. It is responsible for font properties, colors, text alignments, graphics, background
images, tables and other components.
1. Tip: This property allows you to add rounded corners to elements! ...
2. Four values - border-radius: 15px 50px 30px 5px; (first value applies to top-left corner,
second value applies to top-right corner, third value applies to bottom-right corner, and
fourth value applies to bottom-left corner):
Can we apply image to border in css3?
The CSS border-image property allows you to specify an image to be used instead of the
normal border around an element. The property has three parts: The image to use as the border.
Gradients are CSS elements of the image data type that show a transition between two or more
colors. These transitions are shown as either linear or radial.
The box-shadow CSS property adds shadow effects around an element's frame. You can set
multiple effects separated by commas. A box shadow is described by X and Y offsets relative to
the element, blur and spread radius, and color.
The transform property applies a 2D or 3D transformation to an element. This property allows you to
rotate, scale, move, skew, etc., elements.
CSS transitions provide a way to control animation speed when changing CSS properties.
To make the transition occur, you must specify at least two things — the name of the CSS
property to which you want to apply the transition effect using the transition-property CSS
property, and the duration of the transition effect (greater than 0) using the transition-duration
CSS property.
How do you transition and transform in CSS?
Transitions are the grease in the wheel of CSS transforms. Without a transition, an element
being transformed would change abruptly from one state to another. By applying a transition
you can control the change, making it smooth and gradual.
You can change as many CSS properties you want, as many times you want.
To use CSS animation, you must first specify some keyframes for the animation.
Keyframes hold what styles the element will have at certain times.
The Responsive design test means testing the website or URL from different devices.
Practically, it is not possible to test the responsive website completely because to do so we need
to set up various systems for various screen sizes.
What is Parallax?
Parallax scrolling is a web site trend where the background content (i.e. an image) is moved at a
different speed than the foreground content while scrolling. Click on the links below to see the
difference between a website with and without parallax scrolling.
The viewport varies with the device, and will be smaller on a mobile phone than on a computer
screen. Before tablets and mobile phones, web pages were designed only for computer screens,
and it was common for web pages to have a static design and a fixed size.
Then, when we started surfing the internet using tablets and mobile phones, fixed size web pages
were too large to fit the viewport. To fix this, browsers on those devices scaled down the entire
web page to fit the screen.
What is a Grid-View?
Many web pages are based on a grid-view, which means that the page is divided into columns:
Using a grid-view is very helpful when designing web pages. It makes it easier to place elements on the
page.
A responsive grid-view often has 12 columns, and has a total width of 100%, and will shrink and expand
as you resize the browser window.
First ensure that all HTML elements have the box-sizing property set to border-box. This
makes sure that the padding and border are included in the total width and height of the elements.
It uses the @media rule to include a block of CSS properties only if a certain condition is true.