Page 170 - DCAP202_Fundamentals of Web Programming
P. 170
Unit 14: DHTML
Notes
Example: An onload event could execute a JavaScript function to query the browser’s
cookies collection to determine whether the user is a first-time visitor to the page.
CSS: It stands for Cascading Style Sheet. This is used for the presentation part of the web page.
In simple words it holds the designing of the page. The look & feel of the page completely
depends on CSS. In DHTML CSS rules can be modified at both the document and the element
level using JavaScript with event handlers, they can add a significant amount of dynamism with
very little code.
DOM: It stands for Dynamic Object Model and it is the weakest link in DHTML as many of the
browser does not support the DOM functionality. It defines the object and its properties.
Did u know? It is a standard way of accessing and manipulating the static content.
The Document Object Model is a platform and language-neutral interface that allows program
and scripts to dynamically access the content and update it.
Self Assessment
Fill in the blanks:
1. ........................ enables authors to create visually compelling Web sites without the overhead
of server-side programs or complicated sets of controls to achieve special effects.
2. ............................ is used for the presentation part of the web page.
3. .......................... is the weakest link in DHTML as many of the browser does not support the
DOM functionality.
14.2 Cascading Style Sheet
CSS was first developed in 1997, as a way for Web developers to define the look and feel of their
Web pages. It was intended to allow developers to separate content from design so that HTML
could perform more of the function that it was originally based on - the markup of con CSS is
one of the most powerful tools a Web designer can learn because with it you can affect the entire
mood and tone of a Web site. Well written style sheets can be updated quickly and allow sites to
change what is prioritized or valued without any changes to the underlying XHTML.
There are essentially two parts to Cascading Style Sheets:
1. the styles
2. the stylesheet
What this means is that when you want to learn CSS, you need to learn both the style
properties — the styles; and the placement of those properties — the stylesheet.
There are different types of cascading style sheets:
External style sheet, which you use when you want to apply the same styles consistently
across all the pages in your Web site that are linked to it.
Did u know? It is also known as linked style sheet.
LOVELY PROFESSIONAL UNIVERSITY 163