SlideShare a Scribd company logo
Unit 3
DHTML Tutorial
• DHTML stands for Dynamic Hypertext
Markup language i.e., Dynamic HTML.
• Dynamic HTML is not a markup or
programming language but it is a term that
combines the features of various web
development technologies for creating the
web pages dynamic and interactive.
• The DHTML application was introduced by
Microsoft with the release of the 4th version
of IE (Internet Explorer) in 1997.
Components of Dynamic HTML
• DHTML consists of the following four
components or languages:
1. HTML 4.0
2. CSS
3. JavaScript
4. DOM.
• HTML 4.0
• HTML is a client-side markup language, which
is a core component of the DHTML.
• It defines the structure of a web page with
various defined basic elements or tags.
• CSS
• CSS stands for Cascading Style Sheet, which
allows the web users or developers for
controlling the style and layout of the HTML
elements on the web pages
• JavaScript
• JavaScript is a scripting language which is
done on a client-side.
• The various browser supports JavaScript
technology.
• DHTML uses the JavaScript technology for
accessing, controlling, and manipulating the
HTML elements.
• The statements in JavaScript are the
commands which tell the browser for
performing an action.
• DOM
• DOM is the document object model.
• It is a w3c standard, which is a standard
interface of programming for HTML.
• It is mainly used for defining the objects and
properties of all elements in HTML
DHTML JavaScript
• JavaScript can be included in HTML pages,
which creates the content of the page as
dynamic.
• We can easily type the JavaScript code within
the <head> or <body> tag of a HTML page.
• If we want to add the external source file of
JavaScript, we can easily add using the <src>
attribute.
• Following are the various examples, which
describes how to use the JavaScript
technology with the DHTML:
• Document.write() Method
• The document.write() method of JavaScript,
writes the output to a web page.
• Example 1: The following example simply uses
the document.write() method of JavaScript in
the DHTML.
• In this example, we type the JavaScript code in
the <body> tag.
JavaScript and HTML event
• A JavaScript code can also be executed when
some event occurs.
• Suppose, a user clicks an HTML element on a
webpage, and after clicking, the JavaScript
function associated with that HTML element is
automatically invoked. And, then the
statements in the function are performed.
The following example shows the current date
and time with the JavaScript and HTML event
(Onclick).
• In this example, we type the JavaScript code in
the <head> tag.
• In the above code, we displayed the current
date and time with the help of JavaScript in
DHTML.
• In the body tag, we used the anchor tag,
which refers to the page itself.
• When you click on the link, then the function
of JavaScript is called.
• In the JavaScript function, we use the alert()
method in which we type the date() function.
• The date function shows the date and time in
the alert dialog box on the web page.
JavaScript and HTML DOM
• With version 4 of HTML, JavaScript code can
also change the inner content and attributes
of the HTML event.
• This example checks the Grade of a student
according to the percentage criteria with the
JavaScript and HTML DOM.
• In this example, we type the code of a
JavaScript in the <body> tag.
• In the above code, we check the student’s Grade
with the help of JavaScript in DHTML.
• In the JavaScript code, we used the checkGrade()
method, which is invoked when we click on the
button.
• In this function, we stored the value in variable
p.
• The value is taken in the input field.
• When the value is stored, then we convert the
value of p into integer and store the conversion
value in x, because the value in p is text.
• After that, we used the if-else-if statement for
finding the grade according to the percentage.
CSS with JavaScript in DHTML
• With version 4 of HTML, JavaScript code can
also change the style such as size, color, and
face of an HTML element.
• Example 1: The following example changes
the color of a text.
DHTML DOM
• DHTML DOM stands for Dynamic HTML
Document Object Model.
• It is a w3c standard, which is a standard
interface of programming for HTML.
• It is mainly used for defining the objects and
properties of all elements in HTML.
• It also defines the methods for accessing the
HTML elements.
• Example:
• The following program helps in understanding
the concept of DHTML DOM.
• This example changes the color of text and
displays the text in red colour automatically.
Before Run
After Run
DHTML Events
• An event is defined as changing the occurrence of
an object.
• It is compulsory to add the events in the DHTML
page.
• Without events, there will be no dynamic content
on the HTML page.
• The event is a term in the HTML, which triggers
the actions in the web browsers.
• Suppose, any user clicks an HTML element, then
the JavaScript code associated with that element
is executed.
• Actually, the event handlers catch the events
performed by the user and then execute the
code.
Example of events:
1. Click a button.
2. Submitting a form.
3. An image loading or a web page loading, etc.
• Following are the different examples using
the different event handlers, which helps us
to understand the concept of DHTML events:
• Example 1:
• This example uses the onclick event handler,
which is used to change the text after clicking.
• Example 2: This example uses the onsubmit
event handler, which gives an alert after
clicking on a submit button.
Advantages of DHTML
• Following are the various benefits or the
advantages of DHTML (Dynamic HTML):
1. Those web sites and web pages which are
created using this concept are fast.
2. There is no plug-in required for creating the web
page dynamically.
3. Due to the low-bandwidth effect by the dynamic
HTML, the web page functionality is enhanced.
4. This concept provides advanced functionalities
than the static HTML.
5. It is highly flexible, and the user can make
changes easily in the web pages.
Disadvantages of DHTML
• Following are the various disadvantages or
limitations of DHTML (Dynamic HTML):
• The scripts of DHTML does not run properly in
various web browsers. Or in simple words, we
can say that various web browsers do not support
the DHTML. It is only supported by the latest
browsers.
• The coding of those websites that are created
using DHTML is long and complex.
• For understanding the DHTML, users must know
about HTML, CSS, and JavaScript.
• If any user does not know these languages, then
it is a time-consuming and long process in itself.
• Here are 2 ways to disable a
HTML <a> link/anchor element using
• CSS or
• by using inline JavaScript
Disable HTML anchor with
CSS pointer-events: none
• The pointer-events can be set using CSS
properties and selectors:
Document Object Model
• The document object represents the whole
html document.
• When html document is loaded in the
browser, it becomes a document object.
• It is the root element that represents the html
document.
• It has properties and methods.
• By the help of document object, we can add
dynamic content to our web page.
Properties of document object
• Let's see the properties of document object
that can be accessed and modified by the
document object.
Methods of document object
• We can access and change the contents of
document by its methods.
• The important methods of document object
are as follows:
JavaScript - HTML DOM Methods
• HTML DOM methods are actions you can
perform (on HTML Elements).
• HTML DOM properties are values (of HTML
Elements) that you can set or change.
Document Object Model
• The document object represents the whole
html document.
• When html document is loaded in the
browser, it becomes a document object.
• It is the root element that represents the html
document.
• It has properties and methods.
• By the help of document object, we can add
dynamic content to our web page.
• As mentioned earlier, it is the object of
window. So
Accessing field value by document
object
• In this example, we are going to get the value
of input text by user. Here, we are
using document.form1.name.value to get the
value of name field.
• Here, document is the root element that
represents the html document.
• form1 is the name of the form.
• name is the attribute name of the input text.
• value is the property, that returns the value of
the input text.
2. Javascript - document.getElementsByName()
method
• The document.getElementsByName() method
returns all the element of specified name.
• The syntax of the getElementsByName()
method is given below:
• Example of document.getElementsByName()
method
• In this example, we going to count total
number of genders.
• Here, we are using getElementsByName()
method to get all the genders.
3. Javascript -
document.getElementsByTagName() method
• The document.getElementsByTagName() met
hod returns all the element of specified tag
name.
• The syntax of the getElementsByTagName()
method is given below:
• Example of
document.getElementsByTagName() method
In this example, we going to count total
number of paragraphs used in the document.
To do this, we have called the
document.getElementsByTagName("p")
method that returns the total paragraphs.
Changing the Value of an Attribute
This example changes the value of the
src attribute of an <img> element
Finding HTML Elements by Class
Name
• If you want to find all HTML elements with the
same class name,
use getElementsByClassName().
• This example returns a list of all elements
with class="intro".
document.write()
• In JavaScript, document.write() can be used to
write directly to the HTML output stream:
Dynamic HTML content
Validate a 10 digit phone number
Difference between HTML and
DHTML
HTML (Hypertext Markup language) DHTML (Dynamic Hypertext Markup
language)
1. HTML is simply a markup
language.
1. DHTML is not a language, but it is a set
of technologies of web development.
2. It is used for developing and
creating web pages.
2. It is used for creating and designing
the animated and interactive web sites
or pages.
3. This markup language creates
static web pages.
3. This concept creates dynamic
web pages.
4. It does not contain any server-side
scripting code.
4. It may contain the code of
server-side scripting.
5. The files of HTML are stored with
the .html or .htm extension in a
system.
5. The files of DHTML are stored
with the .dhtm extension in a
system.
Event Bubbling
Example of Event Bubbling
Output 1 click on child
Parent is called after child
automatically
Explanation of Code:
• The above code is a HTML and JavaScript based code.
• We have used a div tag having div id = parent and
within div we have nested a button having button id =
child
• Now, within the JavaScript section, we have assigned
the html elements (p1 and c1) using the querySelector
() function to the variable parent and child.
• After that, we have created and included an event
which is the click event to both div element and child
button. Also created two functions that will help us to
know the sequence order of the execution of the
parent and child. It means if the child event is invoked
first, "child is invoked" will be printed otherwise
"parent is invoked" will get printed.
• Thus, when the button is clicked, it will first
print "child is invoked" which means that the
function within the child event handler
executes first. Then it moves to the invocation
of the div parent function.
• The sequence has taken place due to the
concept of event bubbling. Thus, in this way
event bubbling takes place.
Style textAlign Property
CSS Transition
• The CSS transitions are effects that are added
to change the element gradually from one
style to another, without using flash
or JavaScript.
• You should specify two things to
create CSS transition.
1. The CSS property on which you want to add
an effect.
2. The time duration of the effect.
Change Several Property Values
• The following example adds a transition effect
for both the width and height property, with a
duration of 2 seconds for the width and 4
seconds for the height:
CSS transform Property
CSS Multiple Transition Effect
• It is used to add transition effect for more
than one CSS property.
• If you want to add transition effect on more
than one property, separate those properties
with a comma.
• Let's take an example. Here, the transition
effects on width, height and transformation.
CSS filter
• CSS filters are used to set visual effects to text,
images, and other aspects of a webpage.
• The CSS filter property allows us to access the
effects such as color or blur, shifting on the
rendering of an element before the element
gets displayed.
• The syntax of CSS filter property is given
below.
brightness()
• As its name implies, it is used to set the
brightness of an element.
• If the brightness is 0%, then it represents
completely black, whereas 100% brightness
represents the original one.
• It can also accept values above 100% that
provide brighter results.
• We can understand it by using the following
illustration.
blur()
• It is used to apply the blur effect to the
element.
• If the blur value is not specified, then the
value 0 is used as a default value.
• The parameter in blur() property does not
accept the percentage values. A larger value of
it creates more blur.
blur(0px); will remain image
in original
grayscale()
• It converts the input image into black and
white.
• 0% grayscale represents the original one,
whereas 100% represents completely
grayscale.
• It converts the object colors into 256 shades
of gray.
sepia()
• It is used to transform the image into a sepia
image.
• 0% value represents the original image,
whereas the 100% value indicates the
completely sepia.
hue-rotate()
• It applies a hue-rotation on the input image.
Its perimeter value defines the number of
degrees around the color circle; the image will
be adjusted.
• Its default value is 0 degree, which represents
the original image.
• Its maximum value is 360 degrees.
opacity()
• It is used to apply transparency to the input
image.
• Its 0% value indicates completely transparent,
whereas the 100% value represents the
original image, i.e., fully opaque.
invert()
• It is used to invert the samples in the input
image.
• Its 100% value represents completely
inverted, and 0% values leave the unchanged
input.
• Negative values are not allowed in it.
CSS masking
• The mask property in CSS is used to hide an
element using the clipping or masking the image
at specific points.
• Masking defines how to use an image or the
graphical element as a luminance or alpha mask.
It is a graphical operation that can fully or
partially hide the portions of an element or
object.
• Using masking, it is possible to show or hide the
parts of an image with different opacity levels.
• In CSS, the masking is achieved by using
the mask-image property, and we have to
provide an image as the mask.
• Let's understand it using some illustrations.
Example
• In this example, we are placing a mask on the
image element.
• Here, there are two specific images, and we
are applying masking on them, the final image
built by putting the entire mask images
together, stretching them, etc.
• There is another example in which we are also
using the images for masking.
• We are using two images in which one of
them is the mask image that contains stripes.
CSS Positioning Elements
• The position property in CSS tells about the
method of positioning for an element or an
HTML entity. There are five different types of
position property available in CSS:
1. Fixed
2. Static
3. Relative
4. Absolute
5. Sticky
• The positioning of an element can be done
using the top, right, bottom,
and left properties.
• These specify the distance of an HTML
element from the edge of the viewport.
• To set the position by these four properties,
we have to declare the positioning method.
• Let’s understand each of these position
methods in detail:
• Fixed: Any HTML element with position:
fixed property will be positioned relative to
the viewport.
• An element with fixed positioning allows it to
remain at the same position even we scroll
the page.
• We can set the position of the element using
the top, right, bottom, left.
• Example: The below example illustrates the
CSS positioning element by using the position:
fixed property.
Note
2. Static:
This method of positioning is set by default.
If we don’t mention the method of positioning
for any element, the element has
the position: static method by default.
By defining Static, the top, right, bottom and left
will not have any control over the element.
The element will be positioned with the normal
flow of the page
Span example
• Relative:
• An element with position: relative is
positioned relatively with the other elements
which are sitting at top of it.
• If we set its top, right, bottom, or left, other
elements will not fill up the gap left by this
element.
• Example: The below example illustrates the
CSS positioning element by using the position:
relative property.
• Absolute: An element with position:
absolute will be positioned with respect to its
parent.
• The positioning of this element does not
depend upon its siblings or the elements
which are at the same level.
• Example: The below example illustrates the
CSS positioning element by using the position:
absolute property.
• Sticky:
• Element with position: sticky and top:
0 played a role between fixed & relative based
on the position where it is placed.
• If the element is placed at the middle of the
document then when the user scrolls the
document, the sticky element starts scrolling
until it touches the top.
• When it touches the top, it will be fixed at that
place in spite of further scrolling.
• We can stick the element at the bottom, with
the bottom property.
• Example: The below example illustrates the
CSS positioning element by using the position:
sticky property.
• HTML
All CSS Position Properties
Class v/s Id
• The selectors in CSS are part of the CSS ruleset
and used to select the content we want to style.
Id and class both are the CSS element selectors
and are used to identify an element based on its
assigned name.
• CSS id and class selectors are the most
used selectors in CSS.
• During the use of selectors, sometimes there is
confusion occurs between id and class.
• Both of them do not have any default styling
information; they require CSS to select them and
apply it to style.
• Although both are used for selecting the
element, they are different from each other in
many ways.
ID Selector
• The id selector is used to select the id
attribute of an HTML element for selecting a
particular element.
• An id is always unique within the page, so it is
chosen to select a single, unique element.
• It is written with the hash character (#),
followed by the id of the element
In this example, we are selecting the
element with the id "para".
Class Selector
• The class selector is used to select
the HTML elements with a specific class
attribute.
• It is written with a period character . (full stop
symbol) followed by the class name.
CSS Class Selector for a specific
element
• We can also style the specific element using
the class selector, no matter if it is applied to
different elements.
• If we need to specify that only one specific
HTML element should be affected, we must
use the element name with the class selector.
• It will be clear from the following example.
Output
There is another example in which we apply multiple classes on the same element.
Let's see an illustration of the same.
Content Type
• Content Type is also known as MIME (Multipurpose
internet Mail Extension)Type. It is a HTTP header that
provides the description about what are you sending to
the browser.
• MIME is an internet standard that is used for extending
the limited capabilities of email by allowing the
insertion of sounds, images and text in a message.
• The features provided by MIME to the email services
are as given below:
1. It supports the non-ASCII characters
2. It supports the multiple attachments in a single
message
3. It supports the attachment which contains executable
audio, images and video files etc.
4. It supports the unlimited message length.
List of Content Types

More Related Content

Similar to Web Technology Part 3

Webdev bootcamp
Webdev bootcampWebdev bootcamp
Webdev bootcamp
DSCMESCOE
 
Javascript
JavascriptJavascript
Javascript
Mozxai
 
DOM(Document Object Model) in javascript
DOM(Document Object Model) in javascriptDOM(Document Object Model) in javascript
DOM(Document Object Model) in javascript
Rashmi Mishra
 
Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2
GDSCUniversitasMatan
 
The Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedThe Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has Arrived
Gil Fink
 
Dom
DomDom
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
ssuser568d77
 
Extjs
ExtjsExtjs
BITM3730 10-4.pptx
BITM3730 10-4.pptxBITM3730 10-4.pptx
BITM3730 10-4.pptx
MattMarino13
 
MCA-202-W4-L1.pptx
MCA-202-W4-L1.pptxMCA-202-W4-L1.pptx
MCA-202-W4-L1.pptx
manju451965
 
BITM3730 10-3.pptx
BITM3730 10-3.pptxBITM3730 10-3.pptx
BITM3730 10-3.pptx
MattMarino13
 
Build a game with javascript (april 2017)
Build a game with javascript (april 2017)Build a game with javascript (april 2017)
Build a game with javascript (april 2017)
Thinkful
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1
Toni Kolev
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven development
Gil Fink
 
Std 12 Computer Chapter 2 Cascading Style Sheet and Javascript (Part-2)
Std 12 Computer Chapter 2 Cascading Style Sheet and Javascript (Part-2)Std 12 Computer Chapter 2 Cascading Style Sheet and Javascript (Part-2)
Std 12 Computer Chapter 2 Cascading Style Sheet and Javascript (Part-2)
Nuzhat Memon
 
Javascript part 2 DOM.pptx
Javascript part 2 DOM.pptxJavascript part 2 DOM.pptx
Javascript part 2 DOM.pptx
deepa339830
 
JS basics
JS basicsJS basics
JS basics
Mohd Saeed
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
WebStackAcademy
 
Client-side JavaScript
Client-side JavaScriptClient-side JavaScript
Client-side JavaScript
Lilia Sfaxi
 
Welcome to React.pptx
Welcome to React.pptxWelcome to React.pptx
Welcome to React.pptx
PraveenKumar680401
 

Similar to Web Technology Part 3 (20)

Webdev bootcamp
Webdev bootcampWebdev bootcamp
Webdev bootcamp
 
Javascript
JavascriptJavascript
Javascript
 
DOM(Document Object Model) in javascript
DOM(Document Object Model) in javascriptDOM(Document Object Model) in javascript
DOM(Document Object Model) in javascript
 
Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2Bootcamp - Web Development Session 2
Bootcamp - Web Development Session 2
 
The Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has ArrivedThe Time for Vanilla Web Components has Arrived
The Time for Vanilla Web Components has Arrived
 
Dom
DomDom
Dom
 
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
 
Extjs
ExtjsExtjs
Extjs
 
BITM3730 10-4.pptx
BITM3730 10-4.pptxBITM3730 10-4.pptx
BITM3730 10-4.pptx
 
MCA-202-W4-L1.pptx
MCA-202-W4-L1.pptxMCA-202-W4-L1.pptx
MCA-202-W4-L1.pptx
 
BITM3730 10-3.pptx
BITM3730 10-3.pptxBITM3730 10-3.pptx
BITM3730 10-3.pptx
 
Build a game with javascript (april 2017)
Build a game with javascript (april 2017)Build a game with javascript (april 2017)
Build a game with javascript (april 2017)
 
FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1FFW Gabrovo PMG - JavaScript 1
FFW Gabrovo PMG - JavaScript 1
 
Web component driven development
Web component driven developmentWeb component driven development
Web component driven development
 
Std 12 Computer Chapter 2 Cascading Style Sheet and Javascript (Part-2)
Std 12 Computer Chapter 2 Cascading Style Sheet and Javascript (Part-2)Std 12 Computer Chapter 2 Cascading Style Sheet and Javascript (Part-2)
Std 12 Computer Chapter 2 Cascading Style Sheet and Javascript (Part-2)
 
Javascript part 2 DOM.pptx
Javascript part 2 DOM.pptxJavascript part 2 DOM.pptx
Javascript part 2 DOM.pptx
 
JS basics
JS basicsJS basics
JS basics
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
Client-side JavaScript
Client-side JavaScriptClient-side JavaScript
Client-side JavaScript
 
Welcome to React.pptx
Welcome to React.pptxWelcome to React.pptx
Welcome to React.pptx
 

More from Thapar Institute

Digital Electronics Unit_4_new.pptx
Digital Electronics Unit_4_new.pptxDigital Electronics Unit_4_new.pptx
Digital Electronics Unit_4_new.pptx
Thapar Institute
 
Digital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptxDigital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptx
Thapar Institute
 
Digital Electronics Unit_2.pptx
Digital Electronics Unit_2.pptxDigital Electronics Unit_2.pptx
Digital Electronics Unit_2.pptx
Thapar Institute
 
Digital Electronics Unit_1.pptx
Digital Electronics Unit_1.pptxDigital Electronics Unit_1.pptx
Digital Electronics Unit_1.pptx
Thapar Institute
 
C Language Part 1
C Language Part 1C Language Part 1
C Language Part 1
Thapar Institute
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
Thapar Institute
 
Web Technology Part 4
Web Technology Part 4Web Technology Part 4
Web Technology Part 4
Thapar Institute
 
Web Technology Part 1
Web Technology Part 1Web Technology Part 1
Web Technology Part 1
Thapar Institute
 
TOC Introduction
TOC Introduction TOC Introduction
TOC Introduction
Thapar Institute
 
CSS Introduction
CSS Introduction CSS Introduction
CSS Introduction
Thapar Institute
 
COA (Unit_4.pptx)
COA (Unit_4.pptx)COA (Unit_4.pptx)
COA (Unit_4.pptx)
Thapar Institute
 
COA(Unit_3.pptx)
COA(Unit_3.pptx)COA(Unit_3.pptx)
COA(Unit_3.pptx)
Thapar Institute
 
COA (Unit_2.pptx)
COA (Unit_2.pptx)COA (Unit_2.pptx)
COA (Unit_2.pptx)
Thapar Institute
 
COA (Unit_1.pptx)
COA (Unit_1.pptx)COA (Unit_1.pptx)
COA (Unit_1.pptx)
Thapar Institute
 
Software Testing Introduction (Part 4))
 Software Testing Introduction (Part 4)) Software Testing Introduction (Part 4))
Software Testing Introduction (Part 4))
Thapar Institute
 
Software Testing Introduction (Part 3)
 Software Testing Introduction (Part 3) Software Testing Introduction (Part 3)
Software Testing Introduction (Part 3)
Thapar Institute
 
Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)
Thapar Institute
 
Software Testing Introduction (Part 1)
Software Testing Introduction (Part 1)Software Testing Introduction (Part 1)
Software Testing Introduction (Part 1)
Thapar Institute
 

More from Thapar Institute (18)

Digital Electronics Unit_4_new.pptx
Digital Electronics Unit_4_new.pptxDigital Electronics Unit_4_new.pptx
Digital Electronics Unit_4_new.pptx
 
Digital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptxDigital Electronics Unit_3.pptx
Digital Electronics Unit_3.pptx
 
Digital Electronics Unit_2.pptx
Digital Electronics Unit_2.pptxDigital Electronics Unit_2.pptx
Digital Electronics Unit_2.pptx
 
Digital Electronics Unit_1.pptx
Digital Electronics Unit_1.pptxDigital Electronics Unit_1.pptx
Digital Electronics Unit_1.pptx
 
C Language Part 1
C Language Part 1C Language Part 1
C Language Part 1
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
 
Web Technology Part 4
Web Technology Part 4Web Technology Part 4
Web Technology Part 4
 
Web Technology Part 1
Web Technology Part 1Web Technology Part 1
Web Technology Part 1
 
TOC Introduction
TOC Introduction TOC Introduction
TOC Introduction
 
CSS Introduction
CSS Introduction CSS Introduction
CSS Introduction
 
COA (Unit_4.pptx)
COA (Unit_4.pptx)COA (Unit_4.pptx)
COA (Unit_4.pptx)
 
COA(Unit_3.pptx)
COA(Unit_3.pptx)COA(Unit_3.pptx)
COA(Unit_3.pptx)
 
COA (Unit_2.pptx)
COA (Unit_2.pptx)COA (Unit_2.pptx)
COA (Unit_2.pptx)
 
COA (Unit_1.pptx)
COA (Unit_1.pptx)COA (Unit_1.pptx)
COA (Unit_1.pptx)
 
Software Testing Introduction (Part 4))
 Software Testing Introduction (Part 4)) Software Testing Introduction (Part 4))
Software Testing Introduction (Part 4))
 
Software Testing Introduction (Part 3)
 Software Testing Introduction (Part 3) Software Testing Introduction (Part 3)
Software Testing Introduction (Part 3)
 
Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)
 
Software Testing Introduction (Part 1)
Software Testing Introduction (Part 1)Software Testing Introduction (Part 1)
Software Testing Introduction (Part 1)
 

Recently uploaded

Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
Mahmoud Morsy
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
Anant Corporation
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
architagupta876
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
21UME003TUSHARDEB
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
ecqow
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
Madan Karki
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
Nada Hikmah
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
SakkaravarthiShanmug
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
LAXMAREDDY22
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
gowrishankartb2005
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
PKavitha10
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 

Recently uploaded (20)

Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Certificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi AhmedCertificates - Mahmoud Mohamed Moursi Ahmed
Certificates - Mahmoud Mohamed Moursi Ahmed
 
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by AnantLLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
LLM Fine Tuning with QLoRA Cassandra Lunch 4, presented by Anant
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
AI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptxAI assisted telemedicine KIOSK for Rural India.pptx
AI assisted telemedicine KIOSK for Rural India.pptx
 
Mechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdfMechanical Engineering on AAI Summer Training Report-003.pdf
Mechanical Engineering on AAI Summer Training Report-003.pdf
 
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
一比一原版(CalArts毕业证)加利福尼亚艺术学院毕业证如何办理
 
john krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptxjohn krisinger-the science and history of the alcoholic beverage.pptx
john krisinger-the science and history of the alcoholic beverage.pptx
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
Curve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods RegressionCurve Fitting in Numerical Methods Regression
Curve Fitting in Numerical Methods Regression
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
cnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classicationcnn.pptx Convolutional neural network used for image classication
cnn.pptx Convolutional neural network used for image classication
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
BRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdfBRAIN TUMOR DETECTION for seminar ppt.pdf
BRAIN TUMOR DETECTION for seminar ppt.pdf
 
Material for memory and display system h
Material for memory and display system hMaterial for memory and display system h
Material for memory and display system h
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1CEC 352 - SATELLITE COMMUNICATION UNIT 1
CEC 352 - SATELLITE COMMUNICATION UNIT 1
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 

Web Technology Part 3

  • 2. DHTML Tutorial • DHTML stands for Dynamic Hypertext Markup language i.e., Dynamic HTML. • Dynamic HTML is not a markup or programming language but it is a term that combines the features of various web development technologies for creating the web pages dynamic and interactive. • The DHTML application was introduced by Microsoft with the release of the 4th version of IE (Internet Explorer) in 1997.
  • 3. Components of Dynamic HTML • DHTML consists of the following four components or languages: 1. HTML 4.0 2. CSS 3. JavaScript 4. DOM.
  • 4. • HTML 4.0 • HTML is a client-side markup language, which is a core component of the DHTML. • It defines the structure of a web page with various defined basic elements or tags. • CSS • CSS stands for Cascading Style Sheet, which allows the web users or developers for controlling the style and layout of the HTML elements on the web pages
  • 5. • JavaScript • JavaScript is a scripting language which is done on a client-side. • The various browser supports JavaScript technology. • DHTML uses the JavaScript technology for accessing, controlling, and manipulating the HTML elements. • The statements in JavaScript are the commands which tell the browser for performing an action.
  • 6. • DOM • DOM is the document object model. • It is a w3c standard, which is a standard interface of programming for HTML. • It is mainly used for defining the objects and properties of all elements in HTML
  • 7.
  • 8. DHTML JavaScript • JavaScript can be included in HTML pages, which creates the content of the page as dynamic. • We can easily type the JavaScript code within the <head> or <body> tag of a HTML page. • If we want to add the external source file of JavaScript, we can easily add using the <src> attribute. • Following are the various examples, which describes how to use the JavaScript technology with the DHTML:
  • 9. • Document.write() Method • The document.write() method of JavaScript, writes the output to a web page.
  • 10. • Example 1: The following example simply uses the document.write() method of JavaScript in the DHTML. • In this example, we type the JavaScript code in the <body> tag.
  • 11.
  • 12.
  • 13. JavaScript and HTML event • A JavaScript code can also be executed when some event occurs. • Suppose, a user clicks an HTML element on a webpage, and after clicking, the JavaScript function associated with that HTML element is automatically invoked. And, then the statements in the function are performed.
  • 14. The following example shows the current date and time with the JavaScript and HTML event (Onclick). • In this example, we type the JavaScript code in the <head> tag.
  • 15.
  • 16.
  • 17. • In the above code, we displayed the current date and time with the help of JavaScript in DHTML. • In the body tag, we used the anchor tag, which refers to the page itself. • When you click on the link, then the function of JavaScript is called. • In the JavaScript function, we use the alert() method in which we type the date() function. • The date function shows the date and time in the alert dialog box on the web page.
  • 18. JavaScript and HTML DOM • With version 4 of HTML, JavaScript code can also change the inner content and attributes of the HTML event.
  • 19. • This example checks the Grade of a student according to the percentage criteria with the JavaScript and HTML DOM. • In this example, we type the code of a JavaScript in the <body> tag.
  • 20.
  • 21.
  • 22.
  • 23. • In the above code, we check the student’s Grade with the help of JavaScript in DHTML. • In the JavaScript code, we used the checkGrade() method, which is invoked when we click on the button. • In this function, we stored the value in variable p. • The value is taken in the input field. • When the value is stored, then we convert the value of p into integer and store the conversion value in x, because the value in p is text. • After that, we used the if-else-if statement for finding the grade according to the percentage.
  • 24. CSS with JavaScript in DHTML • With version 4 of HTML, JavaScript code can also change the style such as size, color, and face of an HTML element.
  • 25. • Example 1: The following example changes the color of a text.
  • 26.
  • 27.
  • 28.
  • 29. DHTML DOM • DHTML DOM stands for Dynamic HTML Document Object Model. • It is a w3c standard, which is a standard interface of programming for HTML. • It is mainly used for defining the objects and properties of all elements in HTML. • It also defines the methods for accessing the HTML elements.
  • 30. • Example: • The following program helps in understanding the concept of DHTML DOM. • This example changes the color of text and displays the text in red colour automatically.
  • 31.
  • 33. DHTML Events • An event is defined as changing the occurrence of an object. • It is compulsory to add the events in the DHTML page. • Without events, there will be no dynamic content on the HTML page. • The event is a term in the HTML, which triggers the actions in the web browsers. • Suppose, any user clicks an HTML element, then the JavaScript code associated with that element is executed. • Actually, the event handlers catch the events performed by the user and then execute the code.
  • 34. Example of events: 1. Click a button. 2. Submitting a form. 3. An image loading or a web page loading, etc.
  • 35.
  • 36.
  • 37. • Following are the different examples using the different event handlers, which helps us to understand the concept of DHTML events: • Example 1: • This example uses the onclick event handler, which is used to change the text after clicking.
  • 38.
  • 39.
  • 40. • Example 2: This example uses the onsubmit event handler, which gives an alert after clicking on a submit button.
  • 41.
  • 42.
  • 43. Advantages of DHTML • Following are the various benefits or the advantages of DHTML (Dynamic HTML): 1. Those web sites and web pages which are created using this concept are fast. 2. There is no plug-in required for creating the web page dynamically. 3. Due to the low-bandwidth effect by the dynamic HTML, the web page functionality is enhanced. 4. This concept provides advanced functionalities than the static HTML. 5. It is highly flexible, and the user can make changes easily in the web pages.
  • 44. Disadvantages of DHTML • Following are the various disadvantages or limitations of DHTML (Dynamic HTML): • The scripts of DHTML does not run properly in various web browsers. Or in simple words, we can say that various web browsers do not support the DHTML. It is only supported by the latest browsers. • The coding of those websites that are created using DHTML is long and complex. • For understanding the DHTML, users must know about HTML, CSS, and JavaScript. • If any user does not know these languages, then it is a time-consuming and long process in itself.
  • 45. • Here are 2 ways to disable a HTML <a> link/anchor element using • CSS or • by using inline JavaScript
  • 46. Disable HTML anchor with CSS pointer-events: none
  • 47.
  • 48. • The pointer-events can be set using CSS properties and selectors:
  • 49.
  • 50. Document Object Model • The document object represents the whole html document. • When html document is loaded in the browser, it becomes a document object. • It is the root element that represents the html document. • It has properties and methods. • By the help of document object, we can add dynamic content to our web page.
  • 51. Properties of document object • Let's see the properties of document object that can be accessed and modified by the document object.
  • 52.
  • 53. Methods of document object • We can access and change the contents of document by its methods. • The important methods of document object are as follows:
  • 54.
  • 55. JavaScript - HTML DOM Methods • HTML DOM methods are actions you can perform (on HTML Elements). • HTML DOM properties are values (of HTML Elements) that you can set or change.
  • 56.
  • 57.
  • 58.
  • 59. Document Object Model • The document object represents the whole html document. • When html document is loaded in the browser, it becomes a document object. • It is the root element that represents the html document. • It has properties and methods. • By the help of document object, we can add dynamic content to our web page. • As mentioned earlier, it is the object of window. So
  • 60.
  • 61.
  • 62.
  • 63.
  • 64. Accessing field value by document object • In this example, we are going to get the value of input text by user. Here, we are using document.form1.name.value to get the value of name field. • Here, document is the root element that represents the html document. • form1 is the name of the form. • name is the attribute name of the input text. • value is the property, that returns the value of the input text.
  • 65.
  • 66.
  • 67.
  • 68. 2. Javascript - document.getElementsByName() method • The document.getElementsByName() method returns all the element of specified name. • The syntax of the getElementsByName() method is given below:
  • 69. • Example of document.getElementsByName() method • In this example, we going to count total number of genders. • Here, we are using getElementsByName() method to get all the genders.
  • 70.
  • 71.
  • 72.
  • 73. 3. Javascript - document.getElementsByTagName() method • The document.getElementsByTagName() met hod returns all the element of specified tag name. • The syntax of the getElementsByTagName() method is given below:
  • 74. • Example of document.getElementsByTagName() method In this example, we going to count total number of paragraphs used in the document. To do this, we have called the document.getElementsByTagName("p") method that returns the total paragraphs.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91. Changing the Value of an Attribute
  • 92. This example changes the value of the src attribute of an <img> element
  • 93.
  • 94.
  • 95. Finding HTML Elements by Class Name • If you want to find all HTML elements with the same class name, use getElementsByClassName(). • This example returns a list of all elements with class="intro".
  • 96.
  • 97.
  • 98. document.write() • In JavaScript, document.write() can be used to write directly to the HTML output stream:
  • 99.
  • 100.
  • 102.
  • 103.
  • 104. Validate a 10 digit phone number
  • 105.
  • 106.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113. Difference between HTML and DHTML HTML (Hypertext Markup language) DHTML (Dynamic Hypertext Markup language) 1. HTML is simply a markup language. 1. DHTML is not a language, but it is a set of technologies of web development. 2. It is used for developing and creating web pages. 2. It is used for creating and designing the animated and interactive web sites or pages. 3. This markup language creates static web pages. 3. This concept creates dynamic web pages. 4. It does not contain any server-side scripting code. 4. It may contain the code of server-side scripting. 5. The files of HTML are stored with the .html or .htm extension in a system. 5. The files of DHTML are stored with the .dhtm extension in a system.
  • 115.
  • 116. Example of Event Bubbling
  • 117.
  • 118.
  • 119. Output 1 click on child
  • 120. Parent is called after child automatically
  • 121. Explanation of Code: • The above code is a HTML and JavaScript based code. • We have used a div tag having div id = parent and within div we have nested a button having button id = child • Now, within the JavaScript section, we have assigned the html elements (p1 and c1) using the querySelector () function to the variable parent and child. • After that, we have created and included an event which is the click event to both div element and child button. Also created two functions that will help us to know the sequence order of the execution of the parent and child. It means if the child event is invoked first, "child is invoked" will be printed otherwise "parent is invoked" will get printed.
  • 122. • Thus, when the button is clicked, it will first print "child is invoked" which means that the function within the child event handler executes first. Then it moves to the invocation of the div parent function. • The sequence has taken place due to the concept of event bubbling. Thus, in this way event bubbling takes place.
  • 124.
  • 125.
  • 126.
  • 127. CSS Transition • The CSS transitions are effects that are added to change the element gradually from one style to another, without using flash or JavaScript. • You should specify two things to create CSS transition. 1. The CSS property on which you want to add an effect. 2. The time duration of the effect.
  • 128.
  • 129.
  • 130.
  • 131.
  • 132. Change Several Property Values • The following example adds a transition effect for both the width and height property, with a duration of 2 seconds for the width and 4 seconds for the height:
  • 133.
  • 134.
  • 136.
  • 137.
  • 138.
  • 139. CSS Multiple Transition Effect • It is used to add transition effect for more than one CSS property. • If you want to add transition effect on more than one property, separate those properties with a comma. • Let's take an example. Here, the transition effects on width, height and transformation.
  • 140.
  • 141.
  • 142.
  • 143. CSS filter • CSS filters are used to set visual effects to text, images, and other aspects of a webpage. • The CSS filter property allows us to access the effects such as color or blur, shifting on the rendering of an element before the element gets displayed. • The syntax of CSS filter property is given below.
  • 144.
  • 145. brightness() • As its name implies, it is used to set the brightness of an element. • If the brightness is 0%, then it represents completely black, whereas 100% brightness represents the original one. • It can also accept values above 100% that provide brighter results. • We can understand it by using the following illustration.
  • 146.
  • 147.
  • 148. blur() • It is used to apply the blur effect to the element. • If the blur value is not specified, then the value 0 is used as a default value. • The parameter in blur() property does not accept the percentage values. A larger value of it creates more blur.
  • 149. blur(0px); will remain image in original
  • 150.
  • 151. grayscale() • It converts the input image into black and white. • 0% grayscale represents the original one, whereas 100% represents completely grayscale. • It converts the object colors into 256 shades of gray.
  • 152.
  • 153.
  • 154. sepia() • It is used to transform the image into a sepia image. • 0% value represents the original image, whereas the 100% value indicates the completely sepia.
  • 155.
  • 156.
  • 157. hue-rotate() • It applies a hue-rotation on the input image. Its perimeter value defines the number of degrees around the color circle; the image will be adjusted. • Its default value is 0 degree, which represents the original image. • Its maximum value is 360 degrees.
  • 158.
  • 159.
  • 160. opacity() • It is used to apply transparency to the input image. • Its 0% value indicates completely transparent, whereas the 100% value represents the original image, i.e., fully opaque.
  • 161.
  • 162.
  • 163. invert() • It is used to invert the samples in the input image. • Its 100% value represents completely inverted, and 0% values leave the unchanged input. • Negative values are not allowed in it.
  • 164.
  • 165.
  • 166.
  • 167.
  • 168. CSS masking • The mask property in CSS is used to hide an element using the clipping or masking the image at specific points. • Masking defines how to use an image or the graphical element as a luminance or alpha mask. It is a graphical operation that can fully or partially hide the portions of an element or object. • Using masking, it is possible to show or hide the parts of an image with different opacity levels. • In CSS, the masking is achieved by using the mask-image property, and we have to provide an image as the mask. • Let's understand it using some illustrations.
  • 169. Example • In this example, we are placing a mask on the image element. • Here, there are two specific images, and we are applying masking on them, the final image built by putting the entire mask images together, stretching them, etc.
  • 170.
  • 171.
  • 172. • There is another example in which we are also using the images for masking. • We are using two images in which one of them is the mask image that contains stripes.
  • 173.
  • 174.
  • 175. CSS Positioning Elements • The position property in CSS tells about the method of positioning for an element or an HTML entity. There are five different types of position property available in CSS: 1. Fixed 2. Static 3. Relative 4. Absolute 5. Sticky
  • 176. • The positioning of an element can be done using the top, right, bottom, and left properties. • These specify the distance of an HTML element from the edge of the viewport. • To set the position by these four properties, we have to declare the positioning method.
  • 177. • Let’s understand each of these position methods in detail: • Fixed: Any HTML element with position: fixed property will be positioned relative to the viewport. • An element with fixed positioning allows it to remain at the same position even we scroll the page. • We can set the position of the element using the top, right, bottom, left.
  • 178. • Example: The below example illustrates the CSS positioning element by using the position: fixed property.
  • 179.
  • 180.
  • 181.
  • 182.
  • 183.
  • 184. Note
  • 185.
  • 186.
  • 187.
  • 188. 2. Static: This method of positioning is set by default. If we don’t mention the method of positioning for any element, the element has the position: static method by default. By defining Static, the top, right, bottom and left will not have any control over the element. The element will be positioned with the normal flow of the page
  • 189.
  • 191.
  • 192.
  • 193.
  • 194.
  • 195.
  • 196.
  • 197. • Relative: • An element with position: relative is positioned relatively with the other elements which are sitting at top of it. • If we set its top, right, bottom, or left, other elements will not fill up the gap left by this element.
  • 198. • Example: The below example illustrates the CSS positioning element by using the position: relative property.
  • 199.
  • 200.
  • 201. • Absolute: An element with position: absolute will be positioned with respect to its parent. • The positioning of this element does not depend upon its siblings or the elements which are at the same level. • Example: The below example illustrates the CSS positioning element by using the position: absolute property.
  • 202.
  • 203.
  • 204.
  • 205. • Sticky: • Element with position: sticky and top: 0 played a role between fixed & relative based on the position where it is placed. • If the element is placed at the middle of the document then when the user scrolls the document, the sticky element starts scrolling until it touches the top. • When it touches the top, it will be fixed at that place in spite of further scrolling. • We can stick the element at the bottom, with the bottom property.
  • 206. • Example: The below example illustrates the CSS positioning element by using the position: sticky property. • HTML
  • 207.
  • 208.
  • 209.
  • 210.
  • 211.
  • 212. All CSS Position Properties
  • 213.
  • 214. Class v/s Id • The selectors in CSS are part of the CSS ruleset and used to select the content we want to style. Id and class both are the CSS element selectors and are used to identify an element based on its assigned name. • CSS id and class selectors are the most used selectors in CSS. • During the use of selectors, sometimes there is confusion occurs between id and class. • Both of them do not have any default styling information; they require CSS to select them and apply it to style. • Although both are used for selecting the element, they are different from each other in many ways.
  • 215.
  • 216. ID Selector • The id selector is used to select the id attribute of an HTML element for selecting a particular element. • An id is always unique within the page, so it is chosen to select a single, unique element. • It is written with the hash character (#), followed by the id of the element
  • 217. In this example, we are selecting the element with the id "para".
  • 218.
  • 219. Class Selector • The class selector is used to select the HTML elements with a specific class attribute. • It is written with a period character . (full stop symbol) followed by the class name.
  • 220.
  • 221.
  • 222. CSS Class Selector for a specific element • We can also style the specific element using the class selector, no matter if it is applied to different elements. • If we need to specify that only one specific HTML element should be affected, we must use the element name with the class selector. • It will be clear from the following example.
  • 223.
  • 224. Output There is another example in which we apply multiple classes on the same element. Let's see an illustration of the same.
  • 225.
  • 226.
  • 227. Content Type • Content Type is also known as MIME (Multipurpose internet Mail Extension)Type. It is a HTTP header that provides the description about what are you sending to the browser. • MIME is an internet standard that is used for extending the limited capabilities of email by allowing the insertion of sounds, images and text in a message. • The features provided by MIME to the email services are as given below: 1. It supports the non-ASCII characters 2. It supports the multiple attachments in a single message 3. It supports the attachment which contains executable audio, images and video files etc. 4. It supports the unlimited message length.
  • 228. List of Content Types