SlideShare une entreprise Scribd logo
1  sur  46
DHTML & CSS
Ravinder Kamboj
Assistant Professor
LCET, Katani Kalan
What is DHTML?
•DHTML is the combination of several built-in
browser features that enable a web page to be more
dynamic.
•DHTML is NOT a scripting language (like JavaScript
or VBscript), but a browser feature- or enhancement-
that makes the browser dynamic.
•It uses a host of different technologies - JavaScript,
VBScript, the Document Object Model (DOM), layers,
cascading stylesheets - to create HTML that can
change even after a page has been loaded into a
browser.
What is DHTML?
It is considered to be made up of
–HTML
–Cascading Style Sheets (CSS)
–Scripting language
All three of these components are linked via
Document Object Model (DOM)
DOM is the interface that allows scripting
languages to access the content, style, and structure
of the web documents and change them dynamically
Tools of DTHML
•HTML and XML
•Partitions and Organizes the content
•CSS
•Defines the Presentation of the content
•Scripting - JavaScript, JScript, VBScript
•Adds interactivity to the page
•DOM- Document Object Model
•Defines what and how elements are exposed for
script access
Components of DHTML
• DHTML requires four independent components to work: HTML,
Cascading Style Sheets, Scripting and the Document Object Model.
The section provides a brief description of each component.
• HTML
– HTML defines the structure of a Web page, using such basic
elements as headings, forms, tables, paragraphs and links.
– On December 18, 1997, HTML 4.0 attained "recommended"
status at the W3C. Changes and enhancements introduced in
HTML 4.0 made DHTML possible.
Cascading Style Sheets (CSS):
• Similar to a template in a word-processing
document, a style sheet controls the formatting
of HTML elements.
• Like in traditional desktop publishing, one can
use style sheet to specify page margins, point
sizes and leading.
• Cascading Style Sheets is a method to
determine precedence and to resolve conflicts
when multiple styles are used.
Scripting
• Scripting provides the mechanisms to interpret user
actions and produce client-side changes to a page.
• For example, scripts can interpret mouse actions
(such as the mouse passing over a specified area of
a page through the event model) and respond to the
action by using a set of predefined instructions (such
as highlighting the text activated by the mouse
action).
• Although DHTML can communicate with several
scripting languages, JavaScript is the de facto
standard for creating cross-browser DHTML pages.
JavaScript
• JavaScript is a simple, powerful, and popular
programming language that is built into web browsers.
• Learning JavaScript is especially useful if you are a web
designer and already know HTML and CSS, because it is
used to make web pages interactive.
• However, JavaScript is not limited to making interactive
web pages; you can also use it for server-side
programming using a framework like Node.js.
• Using HTML and JavaScript, you can change the
contents of HTML elements in response to user events,
such as a button click.
Document Object Model (DOM)
• The DOM outlines Web page content in a way
that makes it possible for HTML elements, style
sheets and scripting languages to interact with
each other.
• The W3C defines the DOM as "a platform- and
language-neutral interface that will allow
programs and scripts to dynamically access and
update the content, structure, and style of
documents.
• The document can be further processed and the
results of that processing can be incorporated
back into the presented stage."
•DHTML can make your browser dynamic and interactive
•Content and design can be separated using Style sheets &
uniformity of the site can be maintained using them
•Validation of input’s given by the user can be done at the
client side, without connection to the server
•Drop down menus can be used to put a lot of information on
the site
DHTML
CSS in detail
• CSS is an abbreviation for Cascading Style Sheets.
• CSS works with HTML and other Markup Languages (such
as XHTML and XML) to control the way the content is
presented.
• Cascading Style Sheets is a means to separate the
appearance of a webpage from the content of a webpage.
• The presentation is specified by styles, which are presented
in a style sheet.
• Instead of using <FONT> tags over and over again to control
little sections of your page, you can establish some rules to
apply globally, to a single page or all the pages on your site.
• CSS is a great time saver.
What's the "Cascade" part of CSS?
• The cascade part of CSS means that more than
one stylesheet can be attached to a document,
and all of them can influence the presentation.
• For example, a designer can have a global
stylesheet for the whole site, but a local one for
say, controlling the link color and background of a
specific page.
• Or, a user can use her own stylesheet if he/she
has problems seeing the page, or if she just
prefers a certain look.
Why Use CSS?
• Makes Pages More Accessible
– Your pages become more accessible.
– By separating the styling (CSS) from the content and structure (HTML),
you are well on your way to satisfying Accessibility requirements.
– This is an important thing to consider, if you are creating sites that
might be used by the visually impaired.
• Reduces Time
– It is much easier to update pages.
– It is much faster to update a page that uses styles over using <FONT>
tags and the like.
– With CSS, you can decide how headings should appear, and enter that
information once.
– Every heading in every page that is linked to this style sheet now has
that appearance.
– With cascading style sheets, whole organizations can share a small
number of style sheets, ensuring consistency across the site with
no need for constant updating and editing to accommodate changes.
• Multiple Style Sheets Cascade Into One
– Style Sheets allow style information to be
specified in many ways.
– Styles can be specified inside a single HTML
element, inside the <head> element of an HTML
page, or in an external CSS file.
– Even multiple external Style Sheets can be
referenced inside a single HTML document.
How Do Style Sheets Work?
• Style sheets are just text files, or text embedded in the
head of an HTML document, that help separate
content from appearance.
• The content of a page goes into an HTML file and the
appearance goes into a style sheet.
• But how does all this end up as a web page in your
browser? Think of a style sheet as a set of instructions,
suggesting to a web browser how to draw a page.
• The style sheet suggests how the browser should
display the page based on rules you define in the style
sheet.
Syntax
• A CSS comprises of style rules that are interpreted by
the browser and then applied to the corresponding
elements in your document. A style rule is made of
three parts:
– Selector: A selector is an HTML tag at which a style will be
applied. This could be any tag like <h1> or <table> etc.
– Property: A property is a type of attribute of HTML tag. Put
simply, all the HTML attributes are converted into CSS
properties. They could be color, border, etc.
– Value: Values are assigned to properties. For example,
color property can have the value either red or #F1F1F1
etc.
• You can put CSS Style Rule Syntax as follows:
– selector { property: value }
• Example: You can define a table border as
follows:
– table{ border :1px solid #C00; }
Types of selectors
• HTML tag
• ID
• Class
• Universal
• Descendant Selectors
• Child Selectors
HTML tag as Selector
• HTML tag can be used as selector
h1 {
color: #36CFFF;
}
• A style can be applied to multiple tags :
h1,p {
color: #36CFFF;
}
The Universal Selectors
• Rather than selecting elements of a specific
type, the universal selector quite simply
matches the name of any element type:
* {
color: #000000;
}
This rule renders the content of every element
in our document in black.
The Descendant Selectors
• Suppose you want to apply a style rule to a particular
element only when it lies inside a particular element.
• As given in the following example, the style rule will
apply to <em> element only when it lies inside the
<ul> tag.
ul em {
color: #000000;
}
The Class Selectors
• You can define style rules based on the class attribute
of the elements.
• All the elements having that class will be formatted
according to the defined rule.
.black {
color: #000000;
}
Applying style:
<p class=“black">
This para will be styled by the classes center and bold.
</p>
The ID Selectors
• You can define style rules based on the id attribute of the elements.
• All the elements having that id will be formatted according to the defined
rule.
#black {
color: #000000;
}
• The true power of id selectors is when they are used as the foundation
for descendant selectors. For example:
#black h2 {
color: #000000;
}
• In this example, all level 2 headings will be displayed in black color when
those headings will lie within tags having id attribute set to black.
The Child Selectors
• You have seen the descendant selectors.
• There is one more type of selector, which is very similar to
descendants but have different functionality.
• Consider the following example:
body > p {
color: #000000;
}
• This rule will render all the paragraphs in black if they are a
direct child of the <body> element.
• Other paragraphs put inside other elements like <div> or
<td> would not have any effect of this rule.
Multiple Style Rules
• You may need to define multiple style rules for a single element.
• You can define these rules to combine multiple properties and
corresponding values into a single block as defined in the following
example:
h1 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}
• Here all the property and value pairs are separated by a semicolon
(;)
Grouping Selectors
• You can apply a style to many selectors if you like.
• Just separate the selectors with a comma, as given in the
following example:
h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}
• This define style rule will be applicable to h1, h2 and h3 element
as well.
Types of style sheets
• Internal/Embedded
• Inline
• External
Internal CSS - The <style> Element
• You can put your CSS rules into an HTML document using
the <style> element.
• This tag is placed inside the <head>...</head> tags. Rules
defined using this syntax will be applied to all the elements
available in the document.
• Here is the generic syntax:
<head>
<style type="text/css” media=“”>
Style Rules
............
</style>
</head>
Attributes
• Attributes associated with <style> elements
are:
Example
<html>
<head>
<title>Internal Style Sheet</title>
<style type="text/css" media="all">
h1{
color: #36C;
}
</style>
</head>
<body>
<h1>Hello! Students</h1>
</body>
</html>
Example 2
<html>
<head>
<title>Internal Style Sheet</title>
<style type="text/css" media="all">
h1, h2, h3 {
color: #36C;
font-weight: normal;
letter-spacing: .4em;
margin-bottom: 1em;
text-transform: lowercase;
}
</style>
</head>
<body>
<h1>Hello! Students</h1>
<h2>How are you?</h2>
<h3>How is your day</h3>
</body>
</html>
Example 3 width:1000px;
• height:100px;
• font:"Times New Roman", Times, serif;
• color:#FFFFFF;
• background:#990033;
• float:left;
• }
• h2
• {
• font:"Times New Roman", Times, serif;
• color:#FFFFFF;
• }
• </style>
• </head>
• <body>
• <div id="main">
• <div id="heading">
• <center>
• <h2>Internal CSS Styles</h2>
• </center>
• </div>
• <table border="" width="1000px">
• <caption>
• <font color="white">
• <marquee direction="right" loop="infinite" bgcolor="brown">
• <h2>Welcome To Chitkara</h2>
• </marquee>
• </font>
• </caption>
• <tr>
• <td width="222"><img src="1.jpg" width="222" height="155"/></td>
• <th colspan="3" bgcolor="green"><h2>Chitkara University</h2></th>
• </tr>
• <tr>
• <td bgcolor="pink">Home</td>
• <td width="302" bgcolor="pink">Departments</td>
• <td width="250" bgcolor="pink">Admission Cell</td>
• <td width="144" bgcolor="pink">Courses</td>
• </tr>
• </table>
• <div id="quality">
• <p><strong>Quality Policy:</strong> Chitkara University </div>
• <div id="vision">
• <p><strong>Vision: </strong>To create a world class educational environment </div>
• <div id="mission">
• <p><strong>Mission:</strong> To develop dynamic technical professionals to lead the 21 </div>
• </div>
• </body>
• </html>
<html>
<head>
<title>Internal StyleSheet</title>
<style>
#main
{
width:1000px;
margin:auto;
}
#heading
{
width:1000px;
height:50px;
background-color:#003399;
}
#quality
{
width:1000px;
height:100px;
font:"Times New Roman", Times, serif;
color:#FFFFFF;
background-color:#990033;
float:left;
}
#vision
{
width:1000px;
height:100px;
font:"Times New Roman", Times, serif;
color:#FFFFFF;
background:#006600;
float:left;
}
#mission
{
Output
Inline CSS
• You can use style attribute of any HTML
element to define style rules.
• These rules will be applied to that element
only.
• Here is the generic syntax:
<element style="...style rules....">
Example:
<h1 style ="color:#36C;"> This is inline CSS </h1>
Example
<html>
<head>
<title>Inline Style Sheet</title>
</head>
<body>
<h1 style ="color:#36C;"> This is inline CSS </h1>
</body>
</html>
Example 2
<html>
<head>
<title>Inline StyleSheet</title>
</head>
<body>
<div id="main" style="width:1000px; height:auto; margin:auto;">
<div id="heading" style="width:1000px; height:50px; background-color:#CCCCCC">
<center>
<h2 style="font:'Times New Roman', Times, serif; color:#990033">Inline CSS Styles</h2>
</center>
</div>
<div id="heading" style="width:1000px; height:50px; background-color:#FCFFCC">
<center>
<h3 style="font:'Times New Roman', Times, serif; color:#CCCCFF">Hi! How r u?</h3>
</center>
</div>
</div>
</body>
</html>
External CSS
• The <link> element can be used to include an
external stylesheet file in your HTML
document.
• An external style sheet is a separate text file
with .css extension.
• You define all the Style rules within this text
file and then you can include this file in any
HTML document using <link> element.
Syntax
• Here is the generic syntax of including external
CSS file:
<head>
<link type="text/css" rel="stylesheet"
href="external.css" media="all" />
</head>
Attributes
• Attributes associated with <style> elements
are:
Example
• Create three files
– external.css
– page1.html
– Page2.html
external.css
#main
{
background-color:#33FFFF;
}
#one
{
float:left;
width:1000px;
height:200px;
background-color:#CCCCCC;
}
#two
{
width:1000px;
height:100px;
float:left;
background-color:#CFFFCC;
}
#three
{
width:1000px;
background-color:#33FFFF;
height:auto;
float:left;
}
#bottom
{
width:1000px;
height:auto;
background-color:#990033;
float:left;
}
page1
<html>
<head><title>External CSS Demo</title>
<link type="text/css" rel="stylesheet" href="external.css" media="all" />
</head>
<body>
<div id="one">Any inline style sheet takes the highest priority. So, it will override any
rule defined in <style>...</style> tags or the rules defined in any
external style sheet file. </div>
<div id="two">Any rule defined in <style>...</style> tags will override the rules defined
in any external style sheet file.</div>
<div id="three">Any inline style sheet takes the highest priority. So, it will override any
rule defined in <style>...</style> tags or the rules defined in any
external style sheet file.</div>
<div id="main">Any rule defined in <style>...</style> tags will override the rules defined
in any external style sheet file.</div>
<div id="bottom">Any inline style sheet takes the highest priority. So, it will override any
rule defined in <style>...</style> tags or the rules defined in any
external style sheet file.</div>
</body>
</body>
</html>
Output (page1)
page2
<html>
<head><title>External CSS Demo</title>
<link type="text/css" rel="stylesheet" href="external.css" media="all" />
</head>
<body>
<div id="two">Any inline style sheet takes the highest priority. So, it will override any
rule defined in <style>...</style> tags or the rules defined in any
external style sheet file. </div>
<div id="one">Any rule defined in <style>...</style> tags will override the rules defined
in any external style sheet file.</div>
<div id="three">Any inline style sheet takes the highest priority. So, it will override any
rule defined in <style>...</style> tags or the rules defined in any
external style sheet file.</div>
<div id="bottom">Any rule defined in <style>...</style> tags will override the rules defined
in any external style sheet file.</div>
<div id="one">Any inline style sheet takes the highest priority. So, it will override any
rule defined in <style>...</style> tags or the rules defined in any
external style sheet file.</div>
</body>
</body>
</html>
Output (page2)

Contenu connexe

Tendances (20)

Css selectors
Css selectorsCss selectors
Css selectors
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
 
Php forms
Php formsPhp forms
Php forms
 
Displaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSLDisplaying XML Documents Using CSS and XSL
Displaying XML Documents Using CSS and XSL
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
JavaScript - Chapter 8 - Objects
 JavaScript - Chapter 8 - Objects JavaScript - Chapter 8 - Objects
JavaScript - Chapter 8 - Objects
 
CSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive DesignCSS3, Media Queries, and Responsive Design
CSS3, Media Queries, and Responsive Design
 
HTML: Tables and Forms
HTML: Tables and FormsHTML: Tables and Forms
HTML: Tables and Forms
 
Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)
 
html-css
html-csshtml-css
html-css
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Dhtml
DhtmlDhtml
Dhtml
 
XML
XMLXML
XML
 
Data controls ppt
Data controls pptData controls ppt
Data controls ppt
 
Java script errors &amp; exceptions handling
Java script  errors &amp; exceptions handlingJava script  errors &amp; exceptions handling
Java script errors &amp; exceptions handling
 
Ajax ppt
Ajax pptAjax ppt
Ajax ppt
 
Html formatting
Html formattingHtml formatting
Html formatting
 
HTML Tags
HTML TagsHTML Tags
HTML Tags
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
Html
HtmlHtml
Html
 

En vedette

Java server faces
Java server facesJava server faces
Java server facesowli93
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails PresentationJoost Hietbrink
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsBG Java EE Course
 
9. java server faces
9. java server faces9. java server faces
9. java server facesAnusAhmad
 
Data warehouse,data mining & Big Data
Data warehouse,data mining & Big DataData warehouse,data mining & Big Data
Data warehouse,data mining & Big DataRavinder Kamboj
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentationadamcookeuk
 
JavaScript Functions
JavaScript FunctionsJavaScript Functions
JavaScript FunctionsColin DeCarlo
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slidesSmithss25
 

En vedette (15)

Java server faces
Java server facesJava server faces
Java server faces
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
 
Java script
Java scriptJava script
Java script
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
9. java server faces
9. java server faces9. java server faces
9. java server faces
 
Web servers
Web serversWeb servers
Web servers
 
Data warehouse,data mining & Big Data
Data warehouse,data mining & Big DataData warehouse,data mining & Big Data
Data warehouse,data mining & Big Data
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
 
Ruby on Rails for beginners
Ruby on Rails for beginnersRuby on Rails for beginners
Ruby on Rails for beginners
 
Javascript
JavascriptJavascript
Javascript
 
JavaScript Functions
JavaScript FunctionsJavaScript Functions
JavaScript Functions
 
Ajax Ppt
Ajax PptAjax Ppt
Ajax Ppt
 
Java Script (shqip)
Java Script (shqip) Java Script (shqip)
Java Script (shqip)
 
Ajax ppt - 32 slides
Ajax ppt - 32 slidesAjax ppt - 32 slides
Ajax ppt - 32 slides
 
Web Servers (ppt)
Web Servers (ppt)Web Servers (ppt)
Web Servers (ppt)
 

Similaire à DHTML

Cascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptxCascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptxalvindalejoyosa1
 
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.pptssuser568d77
 
Unit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptxUnit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptxTanu524249
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxkarthiksmart21
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmithaps4
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfelayelily
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmitha273566
 
Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...JebaRaj26
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2Sónia
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designersSingsys Pte Ltd
 
Supplement web design
Supplement web designSupplement web design
Supplement web designshelly3160
 

Similaire à DHTML (20)

CSS.pptx
CSS.pptxCSS.pptx
CSS.pptx
 
Cascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptxCascading Style Sheets for web browser.pptx
Cascading Style Sheets for web browser.pptx
 
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
 
Css
CssCss
Css
 
Unit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptxUnit-3-CSS-BWT.pptx
Unit-3-CSS-BWT.pptx
 
WEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptxWEB TECHNOLOGY Unit-2.pptx
WEB TECHNOLOGY Unit-2.pptx
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
 
Css - Tutorial
Css - TutorialCss - Tutorial
Css - Tutorial
 
CSS Bootstrap.pdf
CSS  Bootstrap.pdfCSS  Bootstrap.pdf
CSS Bootstrap.pdf
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...Cascading Styling Sheets(CSS) simple design language intended to transform th...
Cascading Styling Sheets(CSS) simple design language intended to transform th...
 
Css
CssCss
Css
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
 
ppt.ppt
ppt.pptppt.ppt
ppt.ppt
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Supplement web design
Supplement web designSupplement web design
Supplement web design
 
Css.html
Css.htmlCss.html
Css.html
 

Plus de Ravinder Kamboj

Plus de Ravinder Kamboj (13)

DDBMS
DDBMSDDBMS
DDBMS
 
Cost estimation for Query Optimization
Cost estimation for Query OptimizationCost estimation for Query Optimization
Cost estimation for Query Optimization
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
Query processing
Query processingQuery processing
Query processing
 
Normalization of Data Base
Normalization of Data BaseNormalization of Data Base
Normalization of Data Base
 
Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)Architecture of dbms(lecture 3)
Architecture of dbms(lecture 3)
 
Sql fundamentals
Sql fundamentalsSql fundamentals
Sql fundamentals
 
Lecture 1&amp;2(rdbms-ii)
Lecture 1&amp;2(rdbms-ii)Lecture 1&amp;2(rdbms-ii)
Lecture 1&amp;2(rdbms-ii)
 
Java script
Java scriptJava script
Java script
 
File Management
File ManagementFile Management
File Management
 
HTML Forms
HTML FormsHTML Forms
HTML Forms
 
CSA lecture-1
CSA lecture-1CSA lecture-1
CSA lecture-1
 
Relational database management system (rdbms) i
Relational database management system (rdbms) iRelational database management system (rdbms) i
Relational database management system (rdbms) i
 

Dernier

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 

Dernier (20)

Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 

DHTML

  • 1. DHTML & CSS Ravinder Kamboj Assistant Professor LCET, Katani Kalan
  • 2. What is DHTML? •DHTML is the combination of several built-in browser features that enable a web page to be more dynamic. •DHTML is NOT a scripting language (like JavaScript or VBscript), but a browser feature- or enhancement- that makes the browser dynamic. •It uses a host of different technologies - JavaScript, VBScript, the Document Object Model (DOM), layers, cascading stylesheets - to create HTML that can change even after a page has been loaded into a browser.
  • 3. What is DHTML? It is considered to be made up of –HTML –Cascading Style Sheets (CSS) –Scripting language All three of these components are linked via Document Object Model (DOM) DOM is the interface that allows scripting languages to access the content, style, and structure of the web documents and change them dynamically
  • 4. Tools of DTHML •HTML and XML •Partitions and Organizes the content •CSS •Defines the Presentation of the content •Scripting - JavaScript, JScript, VBScript •Adds interactivity to the page •DOM- Document Object Model •Defines what and how elements are exposed for script access
  • 5. Components of DHTML • DHTML requires four independent components to work: HTML, Cascading Style Sheets, Scripting and the Document Object Model. The section provides a brief description of each component. • HTML – HTML defines the structure of a Web page, using such basic elements as headings, forms, tables, paragraphs and links. – On December 18, 1997, HTML 4.0 attained "recommended" status at the W3C. Changes and enhancements introduced in HTML 4.0 made DHTML possible.
  • 6. Cascading Style Sheets (CSS): • Similar to a template in a word-processing document, a style sheet controls the formatting of HTML elements. • Like in traditional desktop publishing, one can use style sheet to specify page margins, point sizes and leading. • Cascading Style Sheets is a method to determine precedence and to resolve conflicts when multiple styles are used.
  • 7. Scripting • Scripting provides the mechanisms to interpret user actions and produce client-side changes to a page. • For example, scripts can interpret mouse actions (such as the mouse passing over a specified area of a page through the event model) and respond to the action by using a set of predefined instructions (such as highlighting the text activated by the mouse action). • Although DHTML can communicate with several scripting languages, JavaScript is the de facto standard for creating cross-browser DHTML pages.
  • 8. JavaScript • JavaScript is a simple, powerful, and popular programming language that is built into web browsers. • Learning JavaScript is especially useful if you are a web designer and already know HTML and CSS, because it is used to make web pages interactive. • However, JavaScript is not limited to making interactive web pages; you can also use it for server-side programming using a framework like Node.js. • Using HTML and JavaScript, you can change the contents of HTML elements in response to user events, such as a button click.
  • 9. Document Object Model (DOM) • The DOM outlines Web page content in a way that makes it possible for HTML elements, style sheets and scripting languages to interact with each other. • The W3C defines the DOM as "a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure, and style of documents. • The document can be further processed and the results of that processing can be incorporated back into the presented stage."
  • 10. •DHTML can make your browser dynamic and interactive •Content and design can be separated using Style sheets & uniformity of the site can be maintained using them •Validation of input’s given by the user can be done at the client side, without connection to the server •Drop down menus can be used to put a lot of information on the site DHTML
  • 11. CSS in detail • CSS is an abbreviation for Cascading Style Sheets. • CSS works with HTML and other Markup Languages (such as XHTML and XML) to control the way the content is presented. • Cascading Style Sheets is a means to separate the appearance of a webpage from the content of a webpage. • The presentation is specified by styles, which are presented in a style sheet. • Instead of using <FONT> tags over and over again to control little sections of your page, you can establish some rules to apply globally, to a single page or all the pages on your site. • CSS is a great time saver.
  • 12. What's the "Cascade" part of CSS? • The cascade part of CSS means that more than one stylesheet can be attached to a document, and all of them can influence the presentation. • For example, a designer can have a global stylesheet for the whole site, but a local one for say, controlling the link color and background of a specific page. • Or, a user can use her own stylesheet if he/she has problems seeing the page, or if she just prefers a certain look.
  • 13. Why Use CSS? • Makes Pages More Accessible – Your pages become more accessible. – By separating the styling (CSS) from the content and structure (HTML), you are well on your way to satisfying Accessibility requirements. – This is an important thing to consider, if you are creating sites that might be used by the visually impaired. • Reduces Time – It is much easier to update pages. – It is much faster to update a page that uses styles over using <FONT> tags and the like. – With CSS, you can decide how headings should appear, and enter that information once. – Every heading in every page that is linked to this style sheet now has that appearance. – With cascading style sheets, whole organizations can share a small number of style sheets, ensuring consistency across the site with no need for constant updating and editing to accommodate changes.
  • 14. • Multiple Style Sheets Cascade Into One – Style Sheets allow style information to be specified in many ways. – Styles can be specified inside a single HTML element, inside the <head> element of an HTML page, or in an external CSS file. – Even multiple external Style Sheets can be referenced inside a single HTML document.
  • 15. How Do Style Sheets Work? • Style sheets are just text files, or text embedded in the head of an HTML document, that help separate content from appearance. • The content of a page goes into an HTML file and the appearance goes into a style sheet. • But how does all this end up as a web page in your browser? Think of a style sheet as a set of instructions, suggesting to a web browser how to draw a page. • The style sheet suggests how the browser should display the page based on rules you define in the style sheet.
  • 16. Syntax • A CSS comprises of style rules that are interpreted by the browser and then applied to the corresponding elements in your document. A style rule is made of three parts: – Selector: A selector is an HTML tag at which a style will be applied. This could be any tag like <h1> or <table> etc. – Property: A property is a type of attribute of HTML tag. Put simply, all the HTML attributes are converted into CSS properties. They could be color, border, etc. – Value: Values are assigned to properties. For example, color property can have the value either red or #F1F1F1 etc.
  • 17. • You can put CSS Style Rule Syntax as follows: – selector { property: value } • Example: You can define a table border as follows: – table{ border :1px solid #C00; }
  • 18. Types of selectors • HTML tag • ID • Class • Universal • Descendant Selectors • Child Selectors
  • 19. HTML tag as Selector • HTML tag can be used as selector h1 { color: #36CFFF; } • A style can be applied to multiple tags : h1,p { color: #36CFFF; }
  • 20. The Universal Selectors • Rather than selecting elements of a specific type, the universal selector quite simply matches the name of any element type: * { color: #000000; } This rule renders the content of every element in our document in black.
  • 21. The Descendant Selectors • Suppose you want to apply a style rule to a particular element only when it lies inside a particular element. • As given in the following example, the style rule will apply to <em> element only when it lies inside the <ul> tag. ul em { color: #000000; }
  • 22. The Class Selectors • You can define style rules based on the class attribute of the elements. • All the elements having that class will be formatted according to the defined rule. .black { color: #000000; } Applying style: <p class=“black"> This para will be styled by the classes center and bold. </p>
  • 23. The ID Selectors • You can define style rules based on the id attribute of the elements. • All the elements having that id will be formatted according to the defined rule. #black { color: #000000; } • The true power of id selectors is when they are used as the foundation for descendant selectors. For example: #black h2 { color: #000000; } • In this example, all level 2 headings will be displayed in black color when those headings will lie within tags having id attribute set to black.
  • 24. The Child Selectors • You have seen the descendant selectors. • There is one more type of selector, which is very similar to descendants but have different functionality. • Consider the following example: body > p { color: #000000; } • This rule will render all the paragraphs in black if they are a direct child of the <body> element. • Other paragraphs put inside other elements like <div> or <td> would not have any effect of this rule.
  • 25. Multiple Style Rules • You may need to define multiple style rules for a single element. • You can define these rules to combine multiple properties and corresponding values into a single block as defined in the following example: h1 { color: #36C; font-weight: normal; letter-spacing: .4em; margin-bottom: 1em; text-transform: lowercase; } • Here all the property and value pairs are separated by a semicolon (;)
  • 26. Grouping Selectors • You can apply a style to many selectors if you like. • Just separate the selectors with a comma, as given in the following example: h1, h2, h3 { color: #36C; font-weight: normal; letter-spacing: .4em; margin-bottom: 1em; text-transform: lowercase; } • This define style rule will be applicable to h1, h2 and h3 element as well.
  • 27. Types of style sheets • Internal/Embedded • Inline • External
  • 28. Internal CSS - The <style> Element • You can put your CSS rules into an HTML document using the <style> element. • This tag is placed inside the <head>...</head> tags. Rules defined using this syntax will be applied to all the elements available in the document. • Here is the generic syntax: <head> <style type="text/css” media=“”> Style Rules ............ </style> </head>
  • 29. Attributes • Attributes associated with <style> elements are:
  • 30. Example <html> <head> <title>Internal Style Sheet</title> <style type="text/css" media="all"> h1{ color: #36C; } </style> </head> <body> <h1>Hello! Students</h1> </body> </html>
  • 31. Example 2 <html> <head> <title>Internal Style Sheet</title> <style type="text/css" media="all"> h1, h2, h3 { color: #36C; font-weight: normal; letter-spacing: .4em; margin-bottom: 1em; text-transform: lowercase; } </style> </head> <body> <h1>Hello! Students</h1> <h2>How are you?</h2> <h3>How is your day</h3> </body> </html>
  • 32. Example 3 width:1000px; • height:100px; • font:"Times New Roman", Times, serif; • color:#FFFFFF; • background:#990033; • float:left; • } • h2 • { • font:"Times New Roman", Times, serif; • color:#FFFFFF; • } • </style> • </head> • <body> • <div id="main"> • <div id="heading"> • <center> • <h2>Internal CSS Styles</h2> • </center> • </div> • <table border="" width="1000px"> • <caption> • <font color="white"> • <marquee direction="right" loop="infinite" bgcolor="brown"> • <h2>Welcome To Chitkara</h2> • </marquee> • </font> • </caption> • <tr> • <td width="222"><img src="1.jpg" width="222" height="155"/></td> • <th colspan="3" bgcolor="green"><h2>Chitkara University</h2></th> • </tr> • <tr> • <td bgcolor="pink">Home</td> • <td width="302" bgcolor="pink">Departments</td> • <td width="250" bgcolor="pink">Admission Cell</td> • <td width="144" bgcolor="pink">Courses</td> • </tr> • </table> • <div id="quality"> • <p><strong>Quality Policy:</strong> Chitkara University </div> • <div id="vision"> • <p><strong>Vision: </strong>To create a world class educational environment </div> • <div id="mission"> • <p><strong>Mission:</strong> To develop dynamic technical professionals to lead the 21 </div> • </div> • </body> • </html> <html> <head> <title>Internal StyleSheet</title> <style> #main { width:1000px; margin:auto; } #heading { width:1000px; height:50px; background-color:#003399; } #quality { width:1000px; height:100px; font:"Times New Roman", Times, serif; color:#FFFFFF; background-color:#990033; float:left; } #vision { width:1000px; height:100px; font:"Times New Roman", Times, serif; color:#FFFFFF; background:#006600; float:left; } #mission {
  • 34. Inline CSS • You can use style attribute of any HTML element to define style rules. • These rules will be applied to that element only. • Here is the generic syntax: <element style="...style rules...."> Example: <h1 style ="color:#36C;"> This is inline CSS </h1>
  • 35. Example <html> <head> <title>Inline Style Sheet</title> </head> <body> <h1 style ="color:#36C;"> This is inline CSS </h1> </body> </html>
  • 36. Example 2 <html> <head> <title>Inline StyleSheet</title> </head> <body> <div id="main" style="width:1000px; height:auto; margin:auto;"> <div id="heading" style="width:1000px; height:50px; background-color:#CCCCCC"> <center> <h2 style="font:'Times New Roman', Times, serif; color:#990033">Inline CSS Styles</h2> </center> </div> <div id="heading" style="width:1000px; height:50px; background-color:#FCFFCC"> <center> <h3 style="font:'Times New Roman', Times, serif; color:#CCCCFF">Hi! How r u?</h3> </center> </div> </div> </body> </html>
  • 37.
  • 38. External CSS • The <link> element can be used to include an external stylesheet file in your HTML document. • An external style sheet is a separate text file with .css extension. • You define all the Style rules within this text file and then you can include this file in any HTML document using <link> element.
  • 39. Syntax • Here is the generic syntax of including external CSS file: <head> <link type="text/css" rel="stylesheet" href="external.css" media="all" /> </head>
  • 40. Attributes • Attributes associated with <style> elements are:
  • 41. Example • Create three files – external.css – page1.html – Page2.html
  • 43. page1 <html> <head><title>External CSS Demo</title> <link type="text/css" rel="stylesheet" href="external.css" media="all" /> </head> <body> <div id="one">Any inline style sheet takes the highest priority. So, it will override any rule defined in <style>...</style> tags or the rules defined in any external style sheet file. </div> <div id="two">Any rule defined in <style>...</style> tags will override the rules defined in any external style sheet file.</div> <div id="three">Any inline style sheet takes the highest priority. So, it will override any rule defined in <style>...</style> tags or the rules defined in any external style sheet file.</div> <div id="main">Any rule defined in <style>...</style> tags will override the rules defined in any external style sheet file.</div> <div id="bottom">Any inline style sheet takes the highest priority. So, it will override any rule defined in <style>...</style> tags or the rules defined in any external style sheet file.</div> </body> </body> </html>
  • 45. page2 <html> <head><title>External CSS Demo</title> <link type="text/css" rel="stylesheet" href="external.css" media="all" /> </head> <body> <div id="two">Any inline style sheet takes the highest priority. So, it will override any rule defined in <style>...</style> tags or the rules defined in any external style sheet file. </div> <div id="one">Any rule defined in <style>...</style> tags will override the rules defined in any external style sheet file.</div> <div id="three">Any inline style sheet takes the highest priority. So, it will override any rule defined in <style>...</style> tags or the rules defined in any external style sheet file.</div> <div id="bottom">Any rule defined in <style>...</style> tags will override the rules defined in any external style sheet file.</div> <div id="one">Any inline style sheet takes the highest priority. So, it will override any rule defined in <style>...</style> tags or the rules defined in any external style sheet file.</div> </body> </body> </html>