CSS XSLT DTD JS. “How to display HTML elements” External Style Sheets can save a lot of work. External Style Sheets are stored in CSS files. id Selector:

Slides:



Advertisements
Similar presentations
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Advertisements

Intro to Javascript CS Client Side Scripting CS380 2.
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.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Presenter: James Huang Date: Sept. 26,  Introduction  Basics  Lists  Links  Forms  CSS 2.
JavaScript Part 6. Calling JavaScript functions on an event JavaScript doesn’t have a main function like other programming languages but we can imitate.
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.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
กระบวนวิชา 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.
4.01 Cascading Style Sheets
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Chapter 8 Cascading Style Sheets (CSS). Agenda Definition of a CSS style Types of CSS Styles CSS Backgrounds CSS Text CSS Fonts CSS Links CSS Lists CSS.
Web Page Introduction. What is a web page? A web page is a text file containing markup language tags. –A markup language combines text and extra information.
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,
CSS Dvijesh Bhatt.
Internet and Web Application Development Revision.
Scripting Languages.
IS432 Semi-Structured Data Lecture 5: XSLT Dr. Gamal Al-Shorbagy.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
SYST Web Technologies SYST Web Technologies Lesson 6 – Intro to JavaScript.
18 People Surveyed HTML (HyperText Markup Language) HTML “tags” Describes structure Building blocks Headings, paragraphs, lists, links, images, quotes,
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
 HTML stands for Hyper Text Mark-up Language. The coding language used to create documents for the World Wide Web  HTML is composed of tags. HTML tags.
Objectives: 1. Create a Skeleton HTML 2. View a Skeleton File Through a Server and Browser 3. Learn HTML Body Tags for the Display of Text and Graphics.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
CHAPTER 1 HTML & HTML5 I อ. ยืนยง กันทะเนตร คณะเทคโนโลยีสารสนเทศและการสื่อสาร มหาวิทยาลัยพะเยา 1.
CC1003N Week 6 More CSS and Javascript.. Objectives: ● More CSS Examples ● Javascript – introduction ● Uses of Javascript ● Variables ● Comments ● Control.
Web Page Introduction. What is a web page? A web page is a text file containing markup language tags. –A markup language combines text and extra information.
CSS Basic (cascading style sheets)
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
XSLT Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
CIS 375—Web App Dev II XSL. 2 XSL Introduction XSL stands for _____________________________. XSL is the language used for manipulating and displaying.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
Cascade Style Sheet Introduction. What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements  Styles were added.
Cascading Style Sheets Part 1. CSS vs HTML HTML: Originally intended to markup structure of a document (,...,,,,,...) CSS Developing technology, CSS1,
Waqas Anwar Next SlidePrevious Slide. Waqas Anwar Next SlidePrevious Slide XML XML stands for EXtensible Markup Language.
CSS Tutorial 1 Introduction Syntax How to use style specifications. Styles.
1 Introduction  Extensible Markup Language (XML) –Uses tags to describe the structure of a document –Simplifies the process of sharing information –Extensible.
JavaScript Syntax, how to use it in a HTML document
Web Development 101 Presented by John Valance
DIV, Span, CSS.
JavaScript. JavaScript is the programming language of HTML and the Web. Easy to learn One of the 3 languages of all developers MUST learn: 1. HTML to.
CSS Cascading Style Sheets A very brief introduction CSS, Cascading Style Sheets1.
Java Script Dvijesh Bhatt. Web Page HTML defines Web sites content through semantic tags (headings, paragraphs, lists, …). CSS defines 'rules' or 'styles'
JavaScript. JavaScript Introduction JavaScript is the world's most popular programming language. It is the language for HTML and the web, for servers,
IS1825 Multimedia Development for Internet Applications Lecture 12: IDs, Classes and Internal CSS Rob Gleasure
1 CSS محمد احمدی نیا 2 Of 21 What is CSS?  CSS stands for Cascading Style Sheets  Styles define how to display HTML elements 
Introduction to Javascript. What is javascript?  The most popular web scripting language in the world  Used to produce rich thin client web applications.
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.
Rendering XML Documents ©NIITeXtensible Markup Language/Lesson 5/Slide 1 of 46 Objectives In this session, you will learn to: * Define rendering * Identify.
Ch. 2. HTML 1. HTML? 2  Tim Berner-Lee first proposed (1981) and coded (1991)  HTML: HyperText Markup Language  Web browser 용  W3C (World Wide Web.
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.
Chapter 4 Java Script – Part2. 2 Location object Properties Properties href – whole path will be displayed. ex: window.location.href ( see example 11)
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.
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 solve a problem External.
Introduction to.
Web Basics: HTML/CSS/JavaScript What are they?
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
Introduction to web design discussing which languages is used for website designing
CASCADING STYLE SHEET CSS.
Website Design 3
Cascading Style Sheets - Building a stylesheet
DHTML Javascript Internet Technology.
DHTML Javascript Internet Technology.
محمد احمدی نیا CSS محمد احمدی نیا
Tutorial 10: Programming with javascript
Cascading Style Sheets - Building a stylesheet
Web Programming and Design
Presentation transcript:

CSS XSLT DTD JS

“How to display HTML elements” External Style Sheets can save a lot of work. External Style Sheets are stored in CSS files. id Selector: The id selector is used to specify a style for a single, unique element. Ex: #para1 { text-align:center; color:red; }

Example:1 #para1 { text-align:center; color:red; } Hello World! This paragraph is not affected by the style.

Example:2 p.center { text-align:center; } This heading will not be affected This paragraph will be center-aligned.

There are three ways of inserting a style sheet: 1.External style sheet 2.Internal style sheet 3.Inline style ESS: ISS: hr {color:sienna;} p {margin-left:20px;} body {background-image:url("images/back40.gif");} IS: This is a paragraph.

Background color: body { background-color:#b0c4de; } My CSS web page! Hello world!

Backgroung image: body {background-image:url(‘imageex.gif');} Hello World!

Font size: h1,h2,p { color:green; } Hello World! Smaller heading! This is a paragraph.

Link: a:link {color:#FF0000;} a:visited {color:#00FF00;} a:hover {color:#FF00FF;} a:active {color:#0000FF;} This is a link Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective. Note: a:active MUST come after a:hover in the CSS definition in order to be effective.

List type: ul.a {list-style-type:circle;} ul.b {list-style-type:disc;} ul.c {list-style-type:square;} Circle type Tea Coca Cola Disc type Tea Coca Cola Square type Tea Coca Cola

Table properties: table, td, th { border:1px solid green; } th { background-color:green; color:white; } Firstname Lastname Savings Peter Griffin $100 Lois Griffin $150

XSLT XML Style Sheet Language

Elements: 1.The Element: A template contains rules to apply when a specified node is matched. 2.The Element: Extract the value of a selected node 3.The Element: Select every XML element of a specified node-set with the element 4.The Element: Sort the output in a node-set 5.The Element Put a conditional test against the content of an XML file

Example: (cd.xml) C book Bob Dylan USA Columbia C++ book Bonnie Tyler UK CBS Records

CD.xsl: My CD Collection Title Artist Country

Output:

element: My CD Collection Title Artist

Element: My CD Collection Title Artist

element:

DTD Document Type Definition

1.The purpose of a DTD (Document Type Definition) is to define the legal building blocks of an XML document. 2.A DTD defines the document structure with a list of legal elements and attributes.

]>

The Building Blocks of XML Documents Seen from a DTD point of view, all XML documents (and HTML documents) are made up by the following building blocks: 1.Elements 2.Attributes 3.Entities 4.PCDATA 5.CDATA

1.Element:

2.Attribute:

Example: Write an XML file which will display the Book information which includes the following: Title of the book Author Name ISBN number Publisher name Edition Price Write a Document Type Definition (DTD) to validate the above XML file. Display the XML file as follows. The contents should be displayed in a table. The header of the table should be in color GREY. And the Author Name column should be displayed in one color and should be capitalized and in bold. Use your own colors for remaining columns. Use XML schemas XSL and CSS for the above purpose. Note: Give at least for 4 books. It should be valid syntactically.

JAVA SCRIPT

Divided into 3 parts 1. Core – heart of the language, includes operators, expressions, stmts, subprograms. 2. Client-side – Collection of objects that support browser and interactions with users( embedded with HTML) 3. Server-side – useful on web server(less frequently used)

Java Vs Javascript Java supports Oops concept whereas the JavaScript does not support Java is a strongly typed language, JavaScript does not provide ( dynamically typed) Objects in Java are static and are dynamic in JavaScript

* JavaScript is the scripting language of the Web. * JavaScript is used in billions of Web pages to add functionality, validate forms, communicate with the server, and much more.

Example: function displayDate() { document.getElementById("demo").innerHTML=Date(); } My First JavaScript This is a paragraph. Display Date. document.getElementById returned a reference to our HTML element demo Each HTML element has an innerHTML property that defines both “the HTML code and the text” that occurs between that element's opening and closing tag.

Variable declaration: var x=5; var y=6; var z=5+6; document.write(x + " "); document.write(y + " "); document.write(z + " ");

Ex:1 var name1="Dhruv Gautham"; var name2='Jayadevi'; var name3="Kanishka"; var name4="Khushal'Jain'"; var name5='Rachit "agarwal" '; document.write(name1 + " ") document.write(name2 + " ") document.write(name3 + " ") document.write(name4 + " ") document.write(name5 + " ")

Javascript objects: var person=new Object(); person.firstname="Rineeth"; person.lastname="Ajay"; person.age=22; person.eyecolor="blue"; document.write(person.firstname + " is " + person.age + " years old." + " Eyes are" + person.eyecolor);

Function: Click the button!! Click Me!! function myFunction(name,job) { alert("Welcome " + name + ",To the " + job); }

Control statements: Click the button to get a time-based greeting. Try it function myFunction() { var x=""; var time=new Date().getHours(); if (time<10) { x="Good morning"; } else if (time<20) { x="Good day"; } else { x="Good evening"; } document.getElementById ( "demo").innerHTML=x; }

For Loop: Click the button to loop through a block of code five times. Try it function myFunction() { var x=""; for (var i=0;i<5;i++) { x=x + "The number is " + i + " "; } document.getElementById("demo").innerHTML=x; }

While loop: Click the button to loop through a block of as long as i is less than 5. Try it function myFunction() { var x="",i=0; while (i<5) { x=x + "The number is " + i + " "; i++; } document.getElementById("demo").innerHTML=x; }

JavaScript: Objects

Types of objects: 1.Math Object 2.String Object 3.Date Object 4.Document Object 5.Window Object

abs(x) ceil(x) floor(x) cos(x) sin(x) sqrt(x) tan(x) exp(x) log(x) max(x,y) min(x,y) pow(x,y) Math objects:

String Objects 1.charAt( index ) 2.charCodeAt( index ) 3.concat( string ) 4.fromCharCode( value1, value2, ) 5.indexOf( substring, index ) 6.lastIndexOf( substring, index ) 7.slice( start, end ) 8.split( string ) 9.substr( start, length ) 10.substring( start, end ) 11.toLowerCase() 12.toUpperCase() 13.toString() 14.valueOf()

Date Objects getDate() getUTCDate() getDay() getUTCDay() getFullYear() getHours() getMilliseconds() getMinutes() getMonth() getSeconds() setDate( val ) setFullYear( y, m, d ) setHours( h, m, s, ms ) setMonth( m, d ) setSeconds( s, ms ) setMinutes( m, s, ms ) toString() valueOf()

Document Objects write( string ) writeln( string ) document.cookie document.lastModified Window Objects open( url, name, options ) prompt( prompt, default ) close() window.focus() window.document window.closed window.opener

Document Object Model – Your web browser builds a model of the web page (the document) that includes all the objects in the page (tags, text, etc) – All of the properties, methods, and events available to the web developer for manipulating and creating web pages are organized into objects – Those objects are accessible via scripting languages in modern web browsers