The document discusses dynamic documents using JavaScript. It introduces positioning elements using CSS properties like absolute, relative, and static. JavaScript can dynamically change these positioning properties to move elements. Elements can be made visible or hidden by changing the visibility property. Font properties and colors can also be modified using JavaScript. Dynamic content can be generated by changing element values on events. Elements can be stacked using z-index to control overlay order. Examples demonstrate changing element positioning, visibility, colors and fonts using JavaScript event handlers.
Education is a powerful tool that opens up the mind and expands our horizons. It provides us with the knowledge and skills necessary to succeed in life and make positive contributions to society.
“Life is too short to waste. Dreams are fulfilled only through action…not through endless planning to take action.“
This document provides an overview of HTML and CSS topics including:
- A brief history of HTML and CSS standards from 1990 to present.
- Descriptions of common HTML elements like <body>, <head>, <img>, <a>, and lists.
- Explanations of CSS concepts like selectors, properties, units, positioning, and layout fundamentals.
- Details on CSS topics like the box model, centering content, semantic HTML, and flexbox.
The document serves as a course outline or reference for learning HTML and CSS fundamentals.
This document provides an overview of web development technologies including HTML, CSS, Bootstrap, SQL, and PHP. It begins with introductions to web development, HTML, and CSS. It then covers Bootstrap frameworks, SQL for databases, and PHP for server-side scripting. Examples of code are provided for each. The document concludes with a thank you slide.
Markup provides information about document structure and presentation. It includes start and closing tags like <p> and </p>. HTML is a markup language used to build web pages and includes elements like <head> and <body>. It has a defined structure with tags nested properly. HTML documents are text files with a .html extension.
Front end full stack development module 1pptxMaruthiPrasad96
The document provides information about the CSE3150 module which covers HTML5 and CSS3. It includes the following topics:
- Module I syllabus covers HTML5 syntax, attributes, events, forms, storage, canvas, and web sockets as well as CSS3 colors, gradients, and transforms.
- An assignment to develop an HR policy website is given.
- Comparisons between HTML4 and HTML5 are provided focusing on new elements, multimedia, forms, storage and responsive design in HTML5.
- Information about code editors such as VS Code, Sublime Text, Atom, Brackets, and WebStorm is listed.
The document provides an overview of HTML5 and how to build web applications with it. Some key points covered include:
- HTML5 is the latest version of HTML and supports new elements, tags, and attributes
- HTML5 pages can be built by writing code between angle brackets and saving it as a file with an .html extension
- CSS can be used to style HTML5 pages through selectors, properties, and linking external style sheets
- JavaScript adds interactivity by manipulating the DOM and creating dynamic content
- Features like forms, multimedia, and drag-and-drop are improved in HTML5 for building robust web applications
- Lit-html is a library that allows HTML templates to be rendered efficiently using JavaScript template literals. It parses template literals and creates a template object with "parts" that can be updated.
- Rendering only updates the dynamic parts of the template, avoiding re-rendering the entire template and reducing work. Templates are treated as values that can be manipulated.
- Google is working on lit-html to standardize its parsing of templates and "template parts" concept, with the goal of it potentially being adopted directly into the web platform. Lit-html aims to have minimal limitations and a standardized public API for extensions.
Education is a powerful tool that opens up the mind and expands our horizons. It provides us with the knowledge and skills necessary to succeed in life and make positive contributions to society.
“Life is too short to waste. Dreams are fulfilled only through action…not through endless planning to take action.“
This document provides an overview of HTML and CSS topics including:
- A brief history of HTML and CSS standards from 1990 to present.
- Descriptions of common HTML elements like <body>, <head>, <img>, <a>, and lists.
- Explanations of CSS concepts like selectors, properties, units, positioning, and layout fundamentals.
- Details on CSS topics like the box model, centering content, semantic HTML, and flexbox.
The document serves as a course outline or reference for learning HTML and CSS fundamentals.
This document provides an overview of web development technologies including HTML, CSS, Bootstrap, SQL, and PHP. It begins with introductions to web development, HTML, and CSS. It then covers Bootstrap frameworks, SQL for databases, and PHP for server-side scripting. Examples of code are provided for each. The document concludes with a thank you slide.
Markup provides information about document structure and presentation. It includes start and closing tags like <p> and </p>. HTML is a markup language used to build web pages and includes elements like <head> and <body>. It has a defined structure with tags nested properly. HTML documents are text files with a .html extension.
Front end full stack development module 1pptxMaruthiPrasad96
The document provides information about the CSE3150 module which covers HTML5 and CSS3. It includes the following topics:
- Module I syllabus covers HTML5 syntax, attributes, events, forms, storage, canvas, and web sockets as well as CSS3 colors, gradients, and transforms.
- An assignment to develop an HR policy website is given.
- Comparisons between HTML4 and HTML5 are provided focusing on new elements, multimedia, forms, storage and responsive design in HTML5.
- Information about code editors such as VS Code, Sublime Text, Atom, Brackets, and WebStorm is listed.
The document provides an overview of HTML5 and how to build web applications with it. Some key points covered include:
- HTML5 is the latest version of HTML and supports new elements, tags, and attributes
- HTML5 pages can be built by writing code between angle brackets and saving it as a file with an .html extension
- CSS can be used to style HTML5 pages through selectors, properties, and linking external style sheets
- JavaScript adds interactivity by manipulating the DOM and creating dynamic content
- Features like forms, multimedia, and drag-and-drop are improved in HTML5 for building robust web applications
- Lit-html is a library that allows HTML templates to be rendered efficiently using JavaScript template literals. It parses template literals and creates a template object with "parts" that can be updated.
- Rendering only updates the dynamic parts of the template, avoiding re-rendering the entire template and reducing work. Templates are treated as values that can be manipulated.
- Google is working on lit-html to standardize its parsing of templates and "template parts" concept, with the goal of it potentially being adopted directly into the web platform. Lit-html aims to have minimal limitations and a standardized public API for extensions.
Ever wondered how google.com was made? How our own college website is made?🤔
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but don’t know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!
Ever wondered how google.com was made? How our own college website is made?🤔
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but don’t know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!🌐
Ever wondered how google.com was made? How our own college website is made?🤔
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but don’t know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!🌐
DSC Charusat brings out a "Learning React" Series workshop for you all. So the first workshop of the series is on 19th Sept,20 (Saturday) and it will cover Basics of HTML, CSS and JS with ES6
Learn html elements and structure cheatsheet codecademynirmalamanjunath
This document provides a cheatsheet on HTML elements and structure. It defines several key elements like <p>, <img>, <a>, <ul>, <ol>, and <div> and describes their purpose and usage. It also covers HTML concepts like tags, attributes, headings, lists, and linking between pages or sections. The cheatsheet aims to summarize essential information on core HTML elements, tags, and syntax for building webpage structure and content.
HTML is the most widely used language to write web pages. It is a markup language that uses tags to structure text and multimedia content. Some key HTML elements include <head>, <title>, <body>, <p>, <img>, <table>, and <div>. HTML allows embedding of images, hyperlinks, lists, tables, forms, iframes and other interactive elements to create dynamic and engaging web pages. While HTML provides structure and layout, additional technologies like CSS and JavaScript are needed for advanced formatting and interactivity.
The document provides an overview of HTML5, including new features such as video playback, drag-and-drop, local storage and geolocation. It discusses HTML5 syntax, elements, attributes, forms, and events. Key points include HTML5 being the latest version that incorporates features previously requiring plugins, improved form handling, and new semantic elements like <header> and <section>. Browser support for HTML5 is good among modern browsers.
The document provides an overview of HTML5, including new features such as video playback, drag-and-drop, local storage, web sockets, and more. It discusses browser support for HTML5, new semantic elements like <header> and <footer>, forms improvements, and the updated syntax of HTML5 which is more flexible than previous standards. The document is a tutorial for HTML5 from TutorialsPoint that aims to give readers a good understanding of the latest capabilities and structure of HTML5.
The document provides an overview of HTML, including:
- A brief history of HTML from its inception in 1991 to current HTML5 standards.
- An explanation of what HTML is and some of its core features like being a markup language, platform independence, and ease of formatting text.
- Descriptions of common HTML elements, tags, attributes, and how to structure a basic HTML document with tags like <html>, <head>, <body>, and use of DOCTYPE.
- Explanations of how to format and style text, add images, links, tables and use CSS for additional styling and layout.
This document provides information about a Web Technology subject for 6th semester students. It includes:
1. An overview of the topics to be covered in the subject, including creation of web pages using HTML, JavaScript, AJAX, PHP and ASP.
2. A list of 20 practical exercises focused on these topics, such as creating lists in HTML, using JavaScript to print dates and perform calculations, and connecting to databases using PHP.
3. Learning objectives and sample code for several of the practical exercises, providing examples of how to implement the various web technologies.
This document provides information about cascading style sheets (CSS). It discusses the different ways to apply stylesheets, including inline, embedded, and external stylesheets. It explains that CSS controls the layout, fonts, colors and overall appearance of web pages. CSS allows separation of design from content and makes pages load faster. The document also covers CSS syntax, selectors, properties and values. Common CSS selectors for HTML elements like headings, paragraphs and horizontal rules are listed along with their properties.
Cascading Style Sheets (CSS) allow the separation of document structure (HTML) from presentation (styles). CSS is applied to HTML using style rules composed of selectors and declarations. There are three main ways to apply CSS - inline with the HTML, internally via <style> tags, or externally in separate .css files. CSS properties control text styling, box model properties like width/height, and other visual aspects of HTML elements. CSS selectors target elements by type, class, ID, and other attributes to style them appropriately.
Markup language classification, designing static and dynamicAnkita Bhalla
The document discusses various markup languages used to create static and dynamic web pages. It describes how static pages are fixed and do not change, while dynamic pages can be modified at runtime through scripts. It provides details on HTML, CSS, JavaScript and server-side scripts for creating dynamic content. Key topics covered include using tags like <div> for layouts, <img> for images, and JavaScript for basic interactivity. The document compares the processing of static versus dynamic pages and outlines benefits of dynamic pages like personalization and database access.
The document provides an overview of HTML5, including its new features such as video playback without plugins, new semantic elements like <header> and <footer>, and support across modern browsers. It discusses HTML5 elements, attributes, syntax, and document structure. New elements help build modern websites, while attributes like class and id can be used to style and identify elements. HTML5 aims to be backwards compatible with older browsers.
The document provides an overview of HTML5, including its new features compared to previous versions of HTML. It describes how HTML5 introduces new semantic elements, forms improvements, local storage capabilities, audio/video embedding without plugins, and drag-and-drop functionality. It also covers HTML5 document structure, elements, attributes, events, and forms improvements in Web Forms 2.0.
The document provides an overview of HTML5, including its new features compared to previous versions of HTML. It describes how HTML5 introduces new semantic elements, forms improvements, local storage capabilities, audio/video embedding without plugins, and drag-and-drop functionality. It also covers HTML5 document structure, elements, attributes, events, and forms improvements in Web Forms 2.0.
The document provides an overview of HTML5, including its new features such as video playback without plugins, new semantic elements like <header> and <footer>, and support across modern browsers. It discusses HTML5's backwards compatibility and flexible syntax compared to previous HTML standards. New elements, attributes, and document structure in HTML5 are also outlined.
The document provides an overview of HTML5, including its new features compared to previous versions of HTML. It describes how HTML5 introduces new semantic elements, forms improvements, local storage capabilities, audio/video embedding without plugins, and drag and drop functionality. It also covers HTML5 syntax changes like the new DOCTYPE declaration and provides examples of using various HTML5 elements, attributes, and events in web pages.
An improved modulation technique suitable for a three level flying capacitor ...IJECEIAES
This research paper introduces an innovative modulation technique for controlling a 3-level flying capacitor multilevel inverter (FCMLI), aiming to streamline the modulation process in contrast to conventional methods. The proposed
simplified modulation technique paves the way for more straightforward and
efficient control of multilevel inverters, enabling their widespread adoption and
integration into modern power electronic systems. Through the amalgamation of
sinusoidal pulse width modulation (SPWM) with a high-frequency square wave
pulse, this controlling technique attains energy equilibrium across the coupling
capacitor. The modulation scheme incorporates a simplified switching pattern
and a decreased count of voltage references, thereby simplifying the control
algorithm.
Ever wondered how google.com was made? How our own college website is made?🤔
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but don’t know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!
Ever wondered how google.com was made? How our own college website is made?🤔
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but don’t know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!🌐
Ever wondered how google.com was made? How our own college website is made?🤔
The recipe is simple: Web Development is all you need for creating such awesome and interactive websites. Just add HTML, CSS and JavaScript to the mix and watch the magic happen!
Want to learn this all but don’t know where to start?
Worry not, for GDSC VJTI hereby presents Introduction to Web Development!🌐
DSC Charusat brings out a "Learning React" Series workshop for you all. So the first workshop of the series is on 19th Sept,20 (Saturday) and it will cover Basics of HTML, CSS and JS with ES6
Learn html elements and structure cheatsheet codecademynirmalamanjunath
This document provides a cheatsheet on HTML elements and structure. It defines several key elements like <p>, <img>, <a>, <ul>, <ol>, and <div> and describes their purpose and usage. It also covers HTML concepts like tags, attributes, headings, lists, and linking between pages or sections. The cheatsheet aims to summarize essential information on core HTML elements, tags, and syntax for building webpage structure and content.
HTML is the most widely used language to write web pages. It is a markup language that uses tags to structure text and multimedia content. Some key HTML elements include <head>, <title>, <body>, <p>, <img>, <table>, and <div>. HTML allows embedding of images, hyperlinks, lists, tables, forms, iframes and other interactive elements to create dynamic and engaging web pages. While HTML provides structure and layout, additional technologies like CSS and JavaScript are needed for advanced formatting and interactivity.
The document provides an overview of HTML5, including new features such as video playback, drag-and-drop, local storage and geolocation. It discusses HTML5 syntax, elements, attributes, forms, and events. Key points include HTML5 being the latest version that incorporates features previously requiring plugins, improved form handling, and new semantic elements like <header> and <section>. Browser support for HTML5 is good among modern browsers.
The document provides an overview of HTML5, including new features such as video playback, drag-and-drop, local storage, web sockets, and more. It discusses browser support for HTML5, new semantic elements like <header> and <footer>, forms improvements, and the updated syntax of HTML5 which is more flexible than previous standards. The document is a tutorial for HTML5 from TutorialsPoint that aims to give readers a good understanding of the latest capabilities and structure of HTML5.
The document provides an overview of HTML, including:
- A brief history of HTML from its inception in 1991 to current HTML5 standards.
- An explanation of what HTML is and some of its core features like being a markup language, platform independence, and ease of formatting text.
- Descriptions of common HTML elements, tags, attributes, and how to structure a basic HTML document with tags like <html>, <head>, <body>, and use of DOCTYPE.
- Explanations of how to format and style text, add images, links, tables and use CSS for additional styling and layout.
This document provides information about a Web Technology subject for 6th semester students. It includes:
1. An overview of the topics to be covered in the subject, including creation of web pages using HTML, JavaScript, AJAX, PHP and ASP.
2. A list of 20 practical exercises focused on these topics, such as creating lists in HTML, using JavaScript to print dates and perform calculations, and connecting to databases using PHP.
3. Learning objectives and sample code for several of the practical exercises, providing examples of how to implement the various web technologies.
This document provides information about cascading style sheets (CSS). It discusses the different ways to apply stylesheets, including inline, embedded, and external stylesheets. It explains that CSS controls the layout, fonts, colors and overall appearance of web pages. CSS allows separation of design from content and makes pages load faster. The document also covers CSS syntax, selectors, properties and values. Common CSS selectors for HTML elements like headings, paragraphs and horizontal rules are listed along with their properties.
Cascading Style Sheets (CSS) allow the separation of document structure (HTML) from presentation (styles). CSS is applied to HTML using style rules composed of selectors and declarations. There are three main ways to apply CSS - inline with the HTML, internally via <style> tags, or externally in separate .css files. CSS properties control text styling, box model properties like width/height, and other visual aspects of HTML elements. CSS selectors target elements by type, class, ID, and other attributes to style them appropriately.
Markup language classification, designing static and dynamicAnkita Bhalla
The document discusses various markup languages used to create static and dynamic web pages. It describes how static pages are fixed and do not change, while dynamic pages can be modified at runtime through scripts. It provides details on HTML, CSS, JavaScript and server-side scripts for creating dynamic content. Key topics covered include using tags like <div> for layouts, <img> for images, and JavaScript for basic interactivity. The document compares the processing of static versus dynamic pages and outlines benefits of dynamic pages like personalization and database access.
The document provides an overview of HTML5, including its new features such as video playback without plugins, new semantic elements like <header> and <footer>, and support across modern browsers. It discusses HTML5 elements, attributes, syntax, and document structure. New elements help build modern websites, while attributes like class and id can be used to style and identify elements. HTML5 aims to be backwards compatible with older browsers.
The document provides an overview of HTML5, including its new features compared to previous versions of HTML. It describes how HTML5 introduces new semantic elements, forms improvements, local storage capabilities, audio/video embedding without plugins, and drag-and-drop functionality. It also covers HTML5 document structure, elements, attributes, events, and forms improvements in Web Forms 2.0.
The document provides an overview of HTML5, including its new features compared to previous versions of HTML. It describes how HTML5 introduces new semantic elements, forms improvements, local storage capabilities, audio/video embedding without plugins, and drag-and-drop functionality. It also covers HTML5 document structure, elements, attributes, events, and forms improvements in Web Forms 2.0.
The document provides an overview of HTML5, including its new features such as video playback without plugins, new semantic elements like <header> and <footer>, and support across modern browsers. It discusses HTML5's backwards compatibility and flexible syntax compared to previous HTML standards. New elements, attributes, and document structure in HTML5 are also outlined.
The document provides an overview of HTML5, including its new features compared to previous versions of HTML. It describes how HTML5 introduces new semantic elements, forms improvements, local storage capabilities, audio/video embedding without plugins, and drag and drop functionality. It also covers HTML5 syntax changes like the new DOCTYPE declaration and provides examples of using various HTML5 elements, attributes, and events in web pages.
Similar to UNIT-III-Chapter 6 [Autosaved].pptx (20)
An improved modulation technique suitable for a three level flying capacitor ...IJECEIAES
This research paper introduces an innovative modulation technique for controlling a 3-level flying capacitor multilevel inverter (FCMLI), aiming to streamline the modulation process in contrast to conventional methods. The proposed
simplified modulation technique paves the way for more straightforward and
efficient control of multilevel inverters, enabling their widespread adoption and
integration into modern power electronic systems. Through the amalgamation of
sinusoidal pulse width modulation (SPWM) with a high-frequency square wave
pulse, this controlling technique attains energy equilibrium across the coupling
capacitor. The modulation scheme incorporates a simplified switching pattern
and a decreased count of voltage references, thereby simplifying the control
algorithm.
artificial intelligence and data science contents.pptxGauravCar
What is artificial intelligence? Artificial intelligence is the ability of a computer or computer-controlled robot to perform tasks that are commonly associated with the intellectual processes characteristic of humans, such as the ability to reason.
› ...
Artificial intelligence (AI) | Definitio
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Sinan KOZAK
Sinan from the Delivery Hero mobile infrastructure engineering team shares a deep dive into performance acceleration with Gradle build cache optimizations. Sinan shares their journey into solving complex build-cache problems that affect Gradle builds. By understanding the challenges and solutions found in our journey, we aim to demonstrate the possibilities for faster builds. The case study reveals how overlapping outputs and cache misconfigurations led to significant increases in build times, especially as the project scaled up with numerous modules using Paparazzi tests. The journey from diagnosing to defeating cache issues offers invaluable lessons on maintaining cache integrity without sacrificing functionality.
Batteries -Introduction – Types of Batteries – discharging and charging of battery - characteristics of battery –battery rating- various tests on battery- – Primary battery: silver button cell- Secondary battery :Ni-Cd battery-modern battery: lithium ion battery-maintenance of batteries-choices of batteries for electric vehicle applications.
Fuel Cells: Introduction- importance and classification of fuel cells - description, principle, components, applications of fuel cells: H2-O2 fuel cell, alkaline fuel cell, molten carbonate fuel cell and direct methanol fuel cells.
Discover the latest insights on Data Driven Maintenance with our comprehensive webinar presentation. Learn about traditional maintenance challenges, the right approach to utilizing data, and the benefits of adopting a Data Driven Maintenance strategy. Explore real-world examples, industry best practices, and innovative solutions like FMECA and the D3M model. This presentation, led by expert Jules Oudmans, is essential for asset owners looking to optimize their maintenance processes and leverage digital technologies for improved efficiency and performance. Download now to stay ahead in the evolving maintenance landscape.
Redefining brain tumor segmentation: a cutting-edge convolutional neural netw...IJECEIAES
Medical image analysis has witnessed significant advancements with deep learning techniques. In the domain of brain tumor segmentation, the ability to
precisely delineate tumor boundaries from magnetic resonance imaging (MRI)
scans holds profound implications for diagnosis. This study presents an ensemble convolutional neural network (CNN) with transfer learning, integrating
the state-of-the-art Deeplabv3+ architecture with the ResNet18 backbone. The
model is rigorously trained and evaluated, exhibiting remarkable performance
metrics, including an impressive global accuracy of 99.286%, a high-class accuracy of 82.191%, a mean intersection over union (IoU) of 79.900%, a weighted
IoU of 98.620%, and a Boundary F1 (BF) score of 83.303%. Notably, a detailed comparative analysis with existing methods showcases the superiority of
our proposed model. These findings underscore the model’s competence in precise brain tumor localization, underscoring its potential to revolutionize medical
image analysis and enhance healthcare outcomes. This research paves the way
for future exploration and optimization of advanced CNN models in medical
imaging, emphasizing addressing false positives and resource efficiency.
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...IJECEIAES
Climate change's impact on the planet forced the United Nations and governments to promote green energies and electric transportation. The deployments of photovoltaic (PV) and electric vehicle (EV) systems gained stronger momentum due to their numerous advantages over fossil fuel types. The advantages go beyond sustainability to reach financial support and stability. The work in this paper introduces the hybrid system between PV and EV to support industrial and commercial plants. This paper covers the theoretical framework of the proposed hybrid system including the required equation to complete the cost analysis when PV and EV are present. In addition, the proposed design diagram which sets the priorities and requirements of the system is presented. The proposed approach allows setup to advance their power stability, especially during power outages. The presented information supports researchers and plant owners to complete the necessary analysis while promoting the deployment of clean energy. The result of a case study that represents a dairy milk farmer supports the theoretical works and highlights its advanced benefits to existing plants. The short return on investment of the proposed approach supports the paper's novelty approach for the sustainable electrical system. In addition, the proposed system allows for an isolated power setup without the need for a transmission line which enhances the safety of the electrical network
2. Topics to be Discussed
1. Introduction
2. Positioning Elements
3. Moving Elements
4. Element Visibility
5. Changing Color and Fonts
6. Dynamic Content
7. Stacking Elements
8. Locating the Mouse Cursor
9. Reacting to a Mouse Click
10. Slow Movement of Elements
11. Dragging and Dropping Elements
3. Introduction
Dynamic HTML document is an HTML document
that in some way can be changed while it is
being displayed by browser
Changes to the document can occur
• When they are explicitly requested by user
interaction
• At regular timed intervals
• Browser event occurs
4. Changes that can be applied to document
• Positioning of HTML element
• Elements can be made to disappear and reappear
• The color of the document both background and
foreground of element can be changed
• The font, font size, and font style of displayed text
can be changed
5. Contd..
• Content of element can be changed
• Overlapping elements can be positioned in a
stacking order
• Determine the position of the mouse cursor
• Elements can be made to move around the
display screen
• Allow the user to drag and drop them anywhere
in the display window
6. Contd..
By writing client side JavaScript code we can apply
all these effects. JavaScript manipulates the
objects of the Document Object Model(DOM)
displayed document
7. Dynamic HTML
It is not a new markup language
It is collection of technologies that allows dynamic
changes to documents defined with HTML.
Dynamic HTML document is an HTML document whose
tag attribute, tag contents, or element style properties
can be changed by user interaction or the occurrences
of a browser event
JavaScript code embedded in html can make such
changes by manipulating the DOM objects associated
with HTML document.
8. Positioning Elements
Cascading Style Sheets-Positioning (CSS-P) was
released in 1997.
CSS-P is completely supported by IE8,IE9,FX3 and
C12.
JavaScript can change the positioning style
properties to place the element anywhere in the
display of a document and also to move an element
to new position in the display dynamically.
9. position property
Position property of CSS has three possible values
absolute
relative
static
Absolute positioning
The absolute position is specified when the
element is to be placed at a specific location in the
document display without regard to the position
of another element.
10. Example
Write an HTML document to display a
paragraph of text to appear 100 pixels from the
left edge and 200 pixels from the top of the
display window.
left, right, top and bottom are used to set the
distance from respective edge of the display
window.
11. HTML CODE
<html>
<head>
<title>Validate Input</title>
</head>
<body >
<p style="position: absolute;left:100px;top:200px;">
This course is an introduction to the basic concepts of programming
languages,
with a strong emphasis on functional programming. The course uses
the languages ML, Racket, and Ruby as vehicles for teaching the concepts,
but the real intent is to teach enough about how any language “fits
together” to make
you more effective programming in any language -- and in learning
new ones.
</p>
</body>
</html>
12.
13. Contd..
Using absolute positioning we can superimpose
special text over a paragraph of ordinary text to
create an effect like a watermark on paper.
Write an HTML document to illustrate that
implements the watermark property.
14. HTML CODE
<html>
<head>
<title>Validate Input</title>
<style type="text/css">
.normal{font-family:Times;font-size:1.2em;width:600px;color:green;}
.w{font-family:Times;font-size:1.9em;font-style:italic;letter-spacing:0.5em;
position:absolute;top:25px;left:10px;color:red;width:500px;}
</style>
</head>
<body >
<p class="normal">
This course is an introduction to the basic concepts of programming languages,
with a strong emphasis on functional programming. The course uses the languages ML, Racket, and Ruby as
vehicles for teaching the concepts,
but the real intent is to teach enough about how any language “fits together” to make
you more effective programming in any language -- and in learning new ones.
<span class="w">HASKELL Programming</span>
</p>
</body>
</html>
15.
16. Placement of nested elements
When an element is absolutely positioned
inside another positional element the top and
left property values are measured from the
enclosing element rather than browser
window.
17. HTML Code
<html>
<head>
<title>Validate Input</title>
<style type="text/css">
.normal{position: absolute;top:100px;left:100px;font-family:Times;font-size:1.2em;width:600px;color:green;}
.w{font-family:Times;font-size:1.9em;font-style:italic;letter-spacing:0.5em;
position:absolute;top:15px;left:30px;color:red;width:500px;}
</style>
</head>
<body >
<p class="normal">
This course is an introduction to the basic concepts of programming languages,
with a strong emphasis on functional programming. The course uses the languages ML, Racket, and Ruby as
vehicles for teaching the concepts,
but the real intent is to teach enough about how any language “fits together” to make
you more effective programming in any language -- and in learning new ones.
<span class="w">HASKELL Programming</span>
</p>
</body>
</html>
18.
19. Relative Positioning
An element with relative position is positioned
relative to its normal position. Normal position
is the default position when the position
property is not set, or position property set to
relative but left and top properties are not set.
Negative values for top and left in both
absolute and relative positioning property
displaces the element upward and to the left
respectively.
20. Example on relative position
<html>
<head>
<title>Validate Input</title>
</head>
<body >
<p style="position:relative;top:100px;">
This course is an introduction to the basic concepts of programming
languages,
with a strong emphasis on functional programming. The course uses
the languages ML, Racket, and Ruby as vehicles for teaching the concepts,
but the real intent is to teach enough about how any language “fits
together” to make
you more effective programming in any language -- and in learning
new ones.
</p>
</body>
</html>
21.
22. Uses of Relative Position
Used to create superscripts and subscripts
Placing the values to be raised or lowered in
<span> tag and displacing them from regular
position.
Displaying text with bigger size
A word embedded in a line can be displayed
with bigger size bcz its font size property is
applied twice through outer and inner style
property.
25. Static Positioning
The default value for the position is static. It is
equivalent position property set to relative but
with no values for top or left given. Statically
placed element initially cannot be displaced
from its normal position and cannot be moved
from that position later.
26. Example
<html>
<head>
<title>Static position</title>
</head>
<body >
<p style="position:static;top:100px;">
This course is an introduction to the basic concepts of programming
languages,
with a strong emphasis on functional programming. The course uses
the languages ML, Racket, and Ruby as vehicles for teaching the concepts,
but the real intent is to teach enough about how any language “fits
together” to make
you more effective programming in any language -- and in learning
new ones.
</p>
</body>
</html>
27.
28. Moving Elements
HTML element whose position property is set
to either absolute or relative can be moved by
changing the top and left property values.
If its position is set to absolute the elements
moves to new values of top and left.
If its position is set to relative it moves from its
original position by distances given by the new
values for top and left.
29. Example
Write, test, validate the HTML document to
display an absolutely positioned image. HTML
document must include two text boxes labeled
x coordinate and y coordinate, respectively.
The user can enter new values for the top and
left properties of the image in these boxes.
When MoveIt button is pressed the image must
be displayed at new position. Write a JavaScript
file which changes the position values and store
it in separate file.
31. JavaScript Code
//Event handler to move the picture
function movit()
{
d=document.getElementById("f").style;
newleft=document.getElementById(“1").value;
newtop=document.getElementById(“2").value;
d.top=newtop+"px";
d.left=newleft+"px";
}
32.
33.
34. Element Visibility
• Document elements can be made visible or hidden
with the value of visibility property.
• Two possible values for visibility are visible and
hidden
• The appearance and disappearance of an element can
be controlled by the user through a widget
35. Example
Write a HTML document to display an image.
Onclick event initiated by the user must cause
the image disappear and reappear in the
document display. Write a event handler in
separate JavaScript file.
37. JS Code
//Event handler to toggle the image
function flip()
{
d=document.getElementById("f").style;
// document.write(d);
if(d.visibility==='visible')
d.visibility='hidden';
else
d.visibility='visible';
}
38.
39.
40.
41. Changing Colors and Fonts
Changing Colors:
The background and foreground colors of the
document display can be changed dynamically.
42. Example
Design a HTML document that display a heading
change background and foreground color of a
document and two textboxes to accept color
specification for background in first box and for
foreground color in second box. onblur event of
the first textbox must trigger the event handler1
that apply color entered by user to background
and onblur event of second textbox must trigger
the event handler2 that apply color entered by
user to foreground. Write a two event handler in
separate javascript file.
43. HTML Code
<html>
<head>
<title>Change Colors</title>
<script type="text/javascript" src="a1.js"></script>
</head>
<body >
<h1 id="13" style="color:black;">Change Background and
Foreground Color of a Document</h1>
<form >
<label>Background color:<input type="text" id="11" size="20"
onblur="change_color1();"/></label></br></br>
<label>Foreground color:<input id="12" type="text" size="20"
onblur="change_color2();"/></label></br>
</form>
</body>
</html>
44. JS Code
//Event handlers to change the color
function change_color1()
{
n=document.getElementById("11").value;
document.body.style.backgroundColor=n;
}
function change_color2()
{
n=document.getElementById("12").value;
document.getElementById("13").style.color=n;
}
45.
46.
47.
48. Modify1
Modify the above program by writing one event
handler for both the event of textbox.
Modify2
Modify the above exercise by adding menu to
select options for color and radio button for
selection of foreground and background.
49. Modify1
<html>
<head>
<title>Change Colors</title>
<script type="text/javascript" src="a1.js"></script>
</head>
<body >
<h1 id="13" style="color:black;">Change Background and Foreground
Color of a Document</h1>
<form >
<label>Background color:<input type="text" id="11" size="20"
onblur="change_color('background',this.value);"/></label></br></br>
<label>Foreground color:<input id="12" type="text" size="20"
onblur="change_color('foreground',this.value);"/></label></br>
</form>
</body>
</html>
50. //Event handler to change the color
function change_color(s,p)
{
if(s==='background')
document.body.style.backgroundColor=p;
else
document.getElementById("13").style.color=p;
}
51.
52.
53.
54. Changing Fonts
Using mouseover event we can change any CSS
property of any element in the document
including font.
When mouse is placed over the displayed text
mouserover event occurs and can be used to
trigger the event handler that changes the font
properties or color property.
mouseout is similar to mouseover and occurs
when mouse is moved a way from the element
55. Example
Design a HTML document that display a paragraph
of text. Using mouseover event change the font
properties of text. using mouseout event display
the text in its original style.
Note:CSS property names without hyphen are
same in javascript but CSS property with hypen are
associated in Javascript without hypen and letter
following hypen is captialized. For example font-
size is referred as fontSize in Javascript.
56. HTML Code
<html>
<head>
<title>Changing Font property</title>
<script type="text/javascript" src="a.js">
</script>
</head>
<body >
<p id="3" style="font:1.2em Times;color:blue;"
onmouseover="newstlye()" onmouseout="oldstyle()">
This course is an introduction to the basic concepts of
programming languages.
</p>
</body>
</html>
57. JS Code
//Event handler to change the font property
var d,f,f1,f2;
function newstlye()
{
d=document.getElementById("3").style;
f=d.fontSize;
f1=d.fontStyle;
f2=d.color;
d.fontSize='2.3em';
d.fontStyle='italic';
d.color='red';
}
function oldstyle()
{
d=document.getElementById("3").style;
d.fontSize=f;
d.fontFamily=f1;
d.color=f2;
}
58.
59.
60.
61. Dynamic Content
Write a HTML document to display your
currently located city name on a button. On
bringing the mouseover the button displayed
city name must be changed to your native city
name.
64. Exercise
Design a HTML document to input customer
information through the form that contains two
textbox to enter Name and Email id. Provide
help box to help the user in filling the form.
Help box must appear when user brings the
mouse cursor on the textboxes and help box
must contain information which tell the user
how to fill the filed. Provide help box using text
area.
65. HTML Code
<html>
<head>
<title>Dynamic Content</title>
<script type="text/javascript" src="a.js">
</script>
</head>
<body style="background-color:green">
<textarea id="h" style="position:absolute;left:320px;">
PLZ fill the form according to the instruction</textarea>
<form>
<h1><b>Custmer Information</b></h1>
<label>Name:<input type="text" onmouseover="message(0)" onmouseout="message(2)" />
</label></br>
<label>Email id:<input type="text" onmouseover="message(1)" onmouseout="message(2)"/>
</label></br></br>
<input type="submit" value="Submit"/>
<input type="reset" value="clear"/>
</form>
</body>
</html>
66. JS Code
//Event handler
var a=["Firstname,LastName,Middilename
initial.n",
"user@domain","PLZ fill the form according to
the instruction"];
function message(k)
{
document.getElementById("h").value=a[k];
}
67.
68.
69.
70.
71. Stacking of elements
• The top and left property allow the placement of an
element in 2D
• It is also possible to place element in 3D by using the
concept of stacked element.
• Placement of element in 3D is controlled by z-index
attribute of element.
• An element whose z-index is greater than that of an
element in the same space will be displayed over
other element in the same space.
72. Example
Design a HTML document to display three images
in an overlapped fashion. Each image include
onclick attribute to trigger the event handler which
defines the DOM addresses for the last top
element and the new top element. Then function
sets the zIndex value for old top has 0 and for new
as 10. The script keeps track of which image is
currently on top with the global variable which is
changed every time when new element is moved
to the top with Btop function.
74. JS Code
//event handler function to illustrate stacking
images
var ot="f";
function Btop(nt)
{
dot=document.getElementById(ot).style;
dnt=document.getElementById(nt).style;
dot.zIndex="0";
dnt.zIndex="10";
ot=nt;
}
75.
76.
77.
78.
79. Locating the Mouse Cursor
When mouse is clicked on browser window a event
object is created. This event object is associated
with two pairs of geometric coordinates of the
mouse position.
1.clientX and clientY gives the coordinates of the
mouse cursor relative to the upper left corner of
browser window
2. screenX and screenY gives the coordinates of
the mouse cursor relative to the upper left corner
of computer window
80. HTML Code
<html>
<head>
<title>Mouse cursor position</title>
<script type="text/javascript" src="a.js">
</script>
</head>
<body onclick="find(event)"></body>
<h3>Relative to upper left corner of Browser window</h3>
<label>X coordiante<input type="text"
id="1"/></label><br/>
<label>Y coordinate
<input type="text" id="2"/></label><br/>
</html>
81. JS Code
function find(k)
{
var x=k.clientX;//horizontal (left)
var y=k.clientY;//vertical (top)
document.getElementById("1").value=x;
document.getElementById("2").value=y;
}
82.
83. Reacting to a Mouse click
Write and test HTML document to display a
message ‘welcome to Bec’. Using onmouseover
event move the message to current mouse
location.
84. HTML Code
<html>
<head>
<title>Move any where</title>
<script type="text/javascript" src="a.js">
</script>
</head>
<body onmouseover="find(event)" >
<h1 id="3" style="position:absolute;top:0px;left:0px;
color:red;">Welcome to Bec</h1>
</html>
85. JS Code
function find(k)
{
var x=k.clientX;
var y=k.clientY;
d=document.getElementById("3").style;
d.left=x +"px";
d.top=y +"px";
}
86.
87. Slow Movement of Elements
So far elements are moved through user interaction by
changing the top and left property.
To move an element slowly is to move it by small
amounts of delay repeatedly by changing the top and
left value.
window object has two methods to set the time
setTimeout and setInterval
setTimeout executes the function after specified delay
only once where as setInterval executes the function
repatadley after the specified delay.
Syntax for setTimeout and setInterval
setTimeout(functionname,delaytime,parameters)
88. Program to illustrate setTimeout and
setInterval
<html>
<head>
<title></title>
</head>
<body onload="setTimeout(message,1000);" >
<!-- <body onload="setInterval(message,1000);" > -->
<script type="text/javascript">
function message()
{
document.write("hi");
}
</script>
</body>
</html>
89. Program on slow movement
Design a HTML document to display a image.
Using setInterval/setTimeout move the
displayed image from its original position to
given position by delay of 1secs.
91. JS Code
var fx=50,fy=50,x,y;
function moveit()
{
if(x!==fx || y!==fy)
{
d1=document.getElementById("3").style;
x++;
y++;
d1.left=x+"px";
d1.top=y+"px";
}
}
function find1()
{
d=document.getElementById("3").style;
x=d.left;
y=d.top;
x=x.match(/d+/);
y=y.match(/d+/);
setInterval(moveit,1000);
}
92.
93. Dragging and Dropping Elements
One of the powerful dynamic change is to allow
the user to drag and drop the elements around
the display window.
There are two important steps:
1.Make an object draggable
draggable attribute to set true in the element
to be dragged
94. Contd..
2.Dropping the object
ondragover event specifies where the dragged
data can be dropped. By default elements can
not be dropped in other elements to allow
dropping we must call event.preventDefault();
ondrop event performs the actual drop to be
performed
These attributes are used in the element where
has to be dropped.
98. Example
1. Design dynamic web page to display the
names of fruits. Drag and drop the your
favorite fruits into a box
2. Design dynamic web page to move your
name from position (10,10) to (200,200)
with a delay of 3sec and in each move
change the font color and size.