SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.

Slides:



Advertisements
Similar presentations
Intro to HTML. HTML HTML = HyperText Markup Language Used to define the content of a webpage HTML is made up of tags and attributes Content.
Advertisements

Introduction to HTML & CSS
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
CSS Cascading Style Sheets. Objectives Using Inline Styles Working with Selectors Using Embedded Styles Using an External Style Sheet Applying a Style.
Ideas to Layout Beginning web layout using Cascading Style Sheets (CSS). Basic ideas, practices, tools and resources for designing a tableless web site.
HTML Overview - Cascading Style Sheets (CSS). Before We Begin Make a copy of one of your HTML file you have previously created Make a copy of one of your.
Making Things Look Nice: Visual Appearance and CSS CMPT 281.
Cascading Style Sheets. CSS stands for Cascading Style Sheets and is a simple styling language which allows attaching style to HTML elements. CSS is a.
กระบวนวิชา CSS. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to.
COMPSCI 345 / SOFTENG 350 TUTORIAL WEEK 8 | SAM KAVANAGH.
Web Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage.
1 Creating Web Pages Part 3. 2 CASCADING STYLE SHEETS (CSS): What exactly are they? Set of rules that define how a web browser should display an HTML.
CS 299 – Web Programming and Design Overview of JavaScript and DOM Instructor: Dr. Fang (Daisy) Tang.
4.01 Cascading Style Sheets
HTML BASIC
Inline, Internal, and External FIle
Computer Sciences Department
Review HTML  What is HTML?  HTML is a language for describing web pages.  HTML stands for Hyper Text Markup Language  HTML is not a programming language,
Basics of HTML.
Javascript and the Web Whys and Hows of Javascript.
INTRODUCTION TO DHTML. TOPICS TO BE DISCUSSED……….  Introduction Introduction  UsesUses  ComponentsComponents  Difference between HTML and DHTMLDifference.
Cascading Style Sheets (CSS) Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
Creating a Basic Web Page
DAT602 Database Application Development Lecture 14 HTML.
_ HTML, XHTML & CSS Sami Niemelä | Module 1: Introduction to digital media: Day 02.
Learning HTML. HTML Attributes HTML elements can have attributes Attributes provide additional information about an element Class – specifies a class.
18 People Surveyed HTML (HyperText Markup Language) HTML “tags” Describes structure Building blocks Headings, paragraphs, lists, links, images, quotes,
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
1 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles are normally stored in Style Sheets  Styles.
ITCS373: Internet Technology Week 3: Introduction to CSS Dr. Faisal Al-Qaed.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Just A Few More Fun Objectives 1 Having Some Fun With Java Script 2 Using Style Sheets.
INTRODUCTION TO CSS. OBJECTIVES: D EFINE WHAT CSS IS. K NOW THE HISTORY OF CSS. K NOW THE REASON WHY CSS IS USED. CSS SYNTAX. CSS ID AND CLASS.
CSS CSS is short for C ascading S tyle S heets. It is a new web page layout method that has been added to HTML to give web developers more control over.
CSS Basic (cascading style sheets)
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
The Teacher HTML HTML (3) Cascading Style Sheets.
IS1825: Developing Multimedia Applications for Business Lecture 1: Introduction to CSS Rob Gleasure
Web Design and Development for Business Lecture 4 Cascading Style Sheet (CSS)
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
Web Development 101 Presented by John Valance
DIV, Span, CSS.
DHTML. What is it? Dynamic HTML. Not a standard unlike HTML or Java It is a term applied by both Netscape and Microsoft to a collection of technologies.
Cascading Style Sheets
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
Designing Web Pages The case for CSS. The Power of CSS css Zen Garden
How to… Cascading Style Sheets. How to Insert a Style Sheet When a browser reads a style sheet, it will format the document according to it. There are.
CSS Syntax. Syntax The CSS syntax is made up of three parts: a selector, a property and a value: selector {property: value}
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
Javascript Basic Concepts Presentation By: Er. Sunny Chanday Lecturer CSE/IT RBIENT.
JavaScript and Ajax (JavaScript Dynamic HTML (DHTML)) Week 7 Web site:
CSS DHS Web Design. Location Between the & Start with – End with –
Css lectures. What is CSS? CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem.
CASCADING STYLE SHEET CSS. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem.
Cascading Style Sheets Using HTML. What are they? A set of style rules that tell the web browser how to present a web page or document. In earlier versions.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
1 Cascading Style Sheets
WEB FOUNDATIONS CSS Overview. Outline  What is CSS  What does it do  Where are styles stored  Why use them  What is the cascade effect  CSS Syntax.
Web Basics: HTML/CSS/JavaScript What are they?
CASCADING STYLE SHEET CSS.
Website Design 3
What are Cascading Stylesheets (CSS)?
Tutorial 10: Programming with javascript
Web Programming and Design
Presentation transcript:

SEG3210 DHTML Tutorial

DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image links and other page elements. – CSS - Style Sheets for further formatting of text and html, plus other added features such as positioning and layering content. – JavaScript - The programming language that allows you to accesses and dynamically control the individual properties of both HTML and Style Sheets

Why DHTML With DHTML you can create: –Animation –Pop-up menus –Inclusion of Web page content from external data sources –Elements that can be dragged and dropped within the Web page

HTML (Hyper Text Markup Language) An HTML file is a text file containing small markup tags The markup tags tell the Web browser how to display the page An HTML file must have an htm or html file extension An HTML file can be created using a simple text editor

SEG3210-Lab1 This is Our First Test. This text is Italic Most tags have opening and closing tags:, Only some don’t have it:,, HTML (cont.) gives technical information about the document, and specifies its title. Nothing that appears in the header section will be displayed by the browser.

HTML

Most of html tags have the stander attributes –Not valid in base, head, html, meta, param, script, style, and title elements. AttributeValueDescription ClassClass_rule or style_ruleThe class of the element IdId_nameUnique Id StyleStyle_definitionAn inline style TitleTool tipTooltip text Some tags have attribute such as: –Attributes always come in name/value pairs like this: name="value".

HTML Special treatment for some characters &nbsp, &quot. Click here to see most of HTML Tags and their attributesHTML Tags

SEG3120 Lab1 User Interface Design [1] Course Notes SEG3210 HTML

Try it Student Marks Student Number Student First Name Mark 10 Adem A+ 20 Jack C+

HTML

CSS CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles are normally stored in Style Sheets

CSS External Style Sheets can save you a lot of work External Style Sheets are stored in CSS files Multiple style definitions will cascade into one Why? –Modularity  simplicity, –usability, –reusability, – etc…

CSS Syntax –selector {property: value} The selector is normally the HTML element/tag the property is the attribute you wish to change, –each property can take a value. Three Method to specify 1.Tag Modfier –body {color: black} –p { text-align: center; color: black; font-family: arial }

CSS Three Method to specify 2.Class selector With the class selector you can define different styles for the same type of HTML element –p.right {text-align: right} –p.center {text-align: center} This paragraph will be right-aligned. This paragraph will be center-aligned.

CSS 3.The id Selector With the id selector you can define the same style for different HTML elements #green {color: green} Hello Some text

CSS (cont.) How to Insert a Style Sheet –Internal style An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section by using the – Inline Styles: Many of the Advantages are lost

CSS Example hr {color: green} p {margin-left: 20px} body {background-color:yellow} SEG3210 DHTML tutorial Tag Modifier Inline

CSS Example

CSS (cont.) How to Insert a Style Sheet –External Style Sheet ideal when the style is applied to many pages.css text file

CSS example

CSS Click for more details: CSS Tutorial CSS Tutorial.

JavaScript Introduction JavaScript was designed to add interactivity to HTML pages JavaScript is –a scripting language (a programming language) JavaScript embedded in a web browser connects through interfaces called Document Object Model (DOM) to applications, especially to the server side (web servers) and the client side (web browsers) of web applications. –This allows interactivity and dynamicity.

JavaScript Introduction A JavaScript is usually embedded directly into HTML pages JavaScript is an interpreted language – scripts execute without preliminary compilation

How to Put a JavaScript Into an HTML Page Scripts in the body section: –Scripts to be executed when the page loads go in the body section.. document.write("Hello World!")

Java Script Scripts in the head section: – Scripts to be executed when they are called, or when an event is triggered, go in the head section. ……..

Java Script External JavaScript –Save the external JavaScript file with a.js file extension Deals with web elements using Java command, –If statement –Variables –Loops –…….

JavaScript Examples var d=new Date() var timeh=d.getHours() var timem=d.getMinutes() document.bgColor=“red” document.write("the time is: ") document.write(timeh) document.write(":") document.write(timem) if (timeh>=12) document.write(" PM") else document.write(" AM")

JavaScript – function function message() { alert("Welcome guest!") }

Java Script and DOM My header document.getElementById('header').style.color="red" Note: It is the script that changes the style of the element!

More About DOM

Example Try it function hide() { document.getElementById('txt1').style.visibility ='hidden' } function show() { document.getElementById('txt1').style.visibility = 'visible' } function format() { document.getElementById('txt1').style.color = 'red' document.getElementById('txt1').style.fontSize = '20' document.getElementById('txt1').style.textAlign ="center" document.bgColor='green' }

Example (Cont) function reset() { document.getElementById('txt1').style.color = 'black' document.getElementById('txt1').style.fontSize = '14' document.getElementById('txt1').style.visibility = 'visible' document.bgColor='white' document.getElementById('txt1').style.textAlign ="left" } </script

Next: go through all the examples and try them