SlideShare ist ein Scribd-Unternehmen logo
1 von 31
GD 2017/18 - Apresentação e Regras de Avaliação 1Carlos J. Costa (ISEG)
Client-Side Web Development
An Overview
Carlos J. Costa, Ph.D.
Carlos J. Costa (ISEG) - 2018
Carlos J. Costa (ISEG) - 2018
HTML, CSS & Javascript
Carlos J. Costa (ISEG) - 2018
HTML

Hypertext Markup Language,

Standard language used to access and show
Web Pages

HTML code is interpreted by a browser that
shows results to users

HTML language is composed of tags and text
Carlos J. Costa (ISEG) - 2018
How to write...

Start with
<!DOCTYPE html>
Do not forget
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
What Program should I use?
Carlos J. Costa (ISEG) - 2018
HTML
<!DOCTYPE html>
<html>
<head>
<title>Page title</title>
</head>
<body>
Page Content
</body>
</html>
Carlos J. Costa (ISEG) - 2018
Improving

Elements

Hyperlinks

Images

...
Carlos J. Costa (ISEG) - 2018
Forms
Example
<form method="post" action="test.php">
<p> ----- Register -----</p>
<p>
<input type"text" name="name" size="15" maxlenght="15">
<input type"text" name="name" size="15" maxlenght="15">
</p>
<p><input type"text" name="name" size="40" maxlenght="40"></p>
<p><input type"text" name="name" size="40" maxlenght="40"></p>
<input type="submit" value="Register">
</form>
Carlos J. Costa (ISEG) - 2018
HTML Attribute:

Id - This attribute assigns a name to an
element. This name must be unique in a
document.

Class - This attribute assigns a class name
or set of class names to an element.

Style - This attribute specifies style
information for the current element.

<P id="myparagraph">paragraph.</P>
Carlos J. Costa (ISEG) - 2018
CSS

Cascade Style Sheet

Customize webpage presentation

Definition of rules

Rules may be:
− head
− inline
− separated file

If used a separated file, this file may be shared by several
HTML pages
Carlos J. Costa (ISEG) - 2018
CSS

Define rule:
element {
atribute1:value1;
atribute2: value2;
...}

Example :
H1{
font-size: 36
}
Carlos J. Costa (ISEG) - 2018
CSS

Inline
<p style="color:blue;margin-left:20px;">This paragraph.</p>
Carlos J. Costa (ISEG) - 2018
CSS

In the head
<head>
<style>
body {background-color:yellow;}
p {color:blue;}
</style>
</head>
Carlos J. Costa (ISEG) - 2018
CSS

In a separated file:
<head>
<link rel="stylesheet" type="text/css" href="formatos.css">
</head>
Carlos J. Costa (ISEG) - 2018
Javascript

JavaScript (often shortened to JS) is a language that has the following characteristics:
− lightweight,
− interpreted,
− object-oriented with first-class functions,
− prototype-based,
− dynamic
− multi-paradigm (and supports object-oriented, imperative, and functional
programming styles).

Most known as the scripting language for Web pages, but used in many non-browser
environments as well such as:
Carlos J. Costa (ISEG) - 2018
Javascript
• Create web page
– In the Body
• Execute code <script>...</script>
• Call Function
– In the head
• Functions are declared <script>...</script>
– Separated File
• Functions are declared
Carlos J. Costa (ISEG) - 2018
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script>
function teste(){
alert("Hello!");
}
</script>
</head>
<body>
<button onclick="teste()">show</button>
<img style="position:absolute; top:50px; left:100px;" src="boneco.jpg"/>
</body>
</html>
Javascript
Carlos J. Costa (ISEG) - 2018
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script>
function teste(){
var a=document.getElementById("b1").style.top;
alert(a);
}
</script>
</head>
<body>
<button onclick="teste()">show</button>
<img id="b1"style="position:absolute;top:50px;left:100px;"src="boneco.jpg"/>
</body>
</html>
Javascript
Carlos J. Costa (ISEG) - 2018
Javascript
• Print the current date in a div called
“b2”
document.getElementById("b2").innerHTML =
Date();
• Convert the text content into a integer
content.
var a=parseInt(b);
• What is the operator to concatenate?
+
Carlos J. Costa (ISEG) - 2018
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script>
function teste(){
document.getElementById("b2").innerHTML = Date();
}
</script>
</head>
<body>
<button onclick="teste()">print date</button>
<div id="b2">...</div>
</body>
</html>
Javascript
Carlos J. Costa (ISEG) - 2018
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script>
function teste(){
var a=document.getElementById("b1").style.top;
var a=parseInt(a)+10;
if (a>500){a=500};
document.getElementById("b1").style.top=a+"px";
}
</script>
</head>
<body>
<button onclick="teste()">moving</button>
<img id="b1" style="position:absolute; top:50px; left:100px;"
src="boneco.jpg" />
</body>
</html>
Javascript
Carlos J. Costa (ISEG) - 2018
Javascript
Stop if reach 300 px from the top
Carlos J. Costa (ISEG) - 2018
Javascript
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script>
function teste(){
var a=document.getElementById("b1").style.top;
var a=parseInt(a)+10;
document.getElementById("b1").style.top=a+"px";
}
</script>
</head>
<body>
<button onclick="teste()">moving</button>
<img id="b1" style="position:absolute; top:50px; left:100px;"
src="boneco.jpg" />
</body>
</html>
Carlos J. Costa (ISEG) - 2018
Javascript
Carlos J. Costa (ISEG) - 2018
Web development
Carlos J. Costa (ISEG) - 2018
Web development
Carlos J. Costa (ISEG) - 2018
Web development
Carlos J. Costa (ISEG) - 2018
Web development
Carlos J. Costa (ISEG) - 2018
Web development
Carlos J. Costa (ISEG) - 2018
Users?
Carlos J. Costa (ISEG) - 2018
Bibliography

http://www.w3.org/TR/html401/struct/global.html

https://developer.mozilla.org/en-US/docs/Web/JavaScript

http://www.w3schools.com

Costa, C. J. (2007). Desenvolvimento para web. ITML
press

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

JavaScript
JavaScriptJavaScript
JavaScript
 
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skills
 
Html & CSS - Best practices 2-hour-workshop
Html & CSS - Best practices 2-hour-workshopHtml & CSS - Best practices 2-hour-workshop
Html & CSS - Best practices 2-hour-workshop
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)HTML/CSS Crash Course (april 4 2017)
HTML/CSS Crash Course (april 4 2017)
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Presentation on html, css
Presentation on html, cssPresentation on html, css
Presentation on html, css
 
Html - By Auroskkil
Html - By AuroskkilHtml - By Auroskkil
Html - By Auroskkil
 
html-css
html-csshtml-css
html-css
 
Frontend Crash Course: HTML and CSS
Frontend Crash Course: HTML and CSSFrontend Crash Course: HTML and CSS
Frontend Crash Course: HTML and CSS
 
CSS3 Introduction
CSS3 IntroductionCSS3 Introduction
CSS3 Introduction
 
Sightly - Part 2
Sightly - Part 2Sightly - Part 2
Sightly - Part 2
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
 
HTML CSS JS in Nut shell
HTML  CSS JS in Nut shellHTML  CSS JS in Nut shell
HTML CSS JS in Nut shell
 
Span and Div tags in HTML
Span and Div tags in HTMLSpan and Div tags in HTML
Span and Div tags in HTML
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
HTML & CSS Masterclass
HTML & CSS MasterclassHTML & CSS Masterclass
HTML & CSS Masterclass
 
HTML 5 Simple Tutorial Part 1
HTML 5 Simple Tutorial Part 1HTML 5 Simple Tutorial Part 1
HTML 5 Simple Tutorial Part 1
 

Ähnlich wie Client-Side Web Development - An Overview

C3 웹기술로만드는모바일앱
C3 웹기술로만드는모바일앱C3 웹기술로만드는모바일앱
C3 웹기술로만드는모바일앱
NAVER D2
 
Java script writing javascript
Java script writing javascriptJava script writing javascript
Java script writing javascript
Jesus Obenita Jr.
 
HTML5 - Future of Web
HTML5 - Future of WebHTML5 - Future of Web
HTML5 - Future of Web
Mirza Asif
 
HTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use TodayHTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use Today
Todd Anglin
 

Ähnlich wie Client-Side Web Development - An Overview (20)

Web Page Development - An Overview
Web Page Development - An OverviewWeb Page Development - An Overview
Web Page Development - An Overview
 
Basic JS
Basic JSBasic JS
Basic JS
 
Wt unit 2 ppts client sied technology
Wt unit 2 ppts client sied technologyWt unit 2 ppts client sied technology
Wt unit 2 ppts client sied technology
 
Wt unit 2 ppts client side technology
Wt unit 2 ppts client side technologyWt unit 2 ppts client side technology
Wt unit 2 ppts client side technology
 
C3 웹기술로만드는모바일앱
C3 웹기술로만드는모바일앱C3 웹기술로만드는모바일앱
C3 웹기술로만드는모바일앱
 
Java script writing javascript
Java script writing javascriptJava script writing javascript
Java script writing javascript
 
JAVA SCRIPT
JAVA SCRIPTJAVA SCRIPT
JAVA SCRIPT
 
HTML, CSS And JAVASCRIPT!
HTML, CSS And JAVASCRIPT!HTML, CSS And JAVASCRIPT!
HTML, CSS And JAVASCRIPT!
 
Javascript
JavascriptJavascript
Javascript
 
JS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTINGJS BASICS JAVA SCRIPT SCRIPTING
JS BASICS JAVA SCRIPT SCRIPTING
 
HTML5 - Future of Web
HTML5 - Future of WebHTML5 - Future of Web
HTML5 - Future of Web
 
HTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use TodayHTML5 and CSS3 Techniques You Can Use Today
HTML5 and CSS3 Techniques You Can Use Today
 
php
phpphp
php
 
Javascript by geetanjali
Javascript by geetanjaliJavascript by geetanjali
Javascript by geetanjali
 
WebDev Simplified Day 1 ppt.ppt
WebDev Simplified Day 1 ppt.pptWebDev Simplified Day 1 ppt.ppt
WebDev Simplified Day 1 ppt.ppt
 
JavaScript - Part-1
JavaScript - Part-1JavaScript - Part-1
JavaScript - Part-1
 
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET DevelopersAccelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
Accelerated Adoption: HTML5 and CSS3 for ASP.NET Developers
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Java script by Act Academy
Java script by Act AcademyJava script by Act Academy
Java script by Act Academy
 
Coding the UI
Coding the UICoding the UI
Coding the UI
 

Mehr von Carlos J. Costa

Mehr von Carlos J. Costa (20)

Generative AI
Generative AIGenerative AI
Generative AI
 
IA Generativa
IA GenerativaIA Generativa
IA Generativa
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Power BI Computing Languages
Power BI Computing LanguagesPower BI Computing Languages
Power BI Computing Languages
 
Python Scikit-Learn
Python Scikit-LearnPython Scikit-Learn
Python Scikit-Learn
 
Python Pandas
Python PandasPython Pandas
Python Pandas
 
Python Numpy
Python NumpyPython Numpy
Python Numpy
 
Open Source Robotics as Booster to Creativity
Open Source Robotics as  Booster to CreativityOpen Source Robotics as  Booster to Creativity
Open Source Robotics as Booster to Creativity
 
Introdução à Gestão de Projetos - Conceitos
Introdução à Gestão de Projetos - ConceitosIntrodução à Gestão de Projetos - Conceitos
Introdução à Gestão de Projetos - Conceitos
 
Pós-Graduação em Gestão de Projetos
Pós-Graduação em Gestão de ProjetosPós-Graduação em Gestão de Projetos
Pós-Graduação em Gestão de Projetos
 
Introdução à Gestão de Projeto
Introdução à Gestão de ProjetoIntrodução à Gestão de Projeto
Introdução à Gestão de Projeto
 
Usability
UsabilityUsability
Usability
 
Wordpress
WordpressWordpress
Wordpress
 
HTML
HTMLHTML
HTML
 
ERP
ERPERP
ERP
 
Weka
WekaWeka
Weka
 
Modelo Relacional
Modelo RelacionalModelo Relacional
Modelo Relacional
 
Globalization
GlobalizationGlobalization
Globalization
 
Information systems organization
Information systems organizationInformation systems organization
Information systems organization
 
Tecnologias de Informação (IV)
Tecnologias de Informação (IV)Tecnologias de Informação (IV)
Tecnologias de Informação (IV)
 

Kürzlich hochgeladen

哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
ydyuyu
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Monica Sydney
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Monica Sydney
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
ydyuyu
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Monica Sydney
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
JOHNBEBONYAP1
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
F
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 

Kürzlich hochgeladen (20)

哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
Call girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girlsCall girls Service in Ajman 0505086370 Ajman call girls
Call girls Service in Ajman 0505086370 Ajman call girls
 
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu DhabiAbu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
Abu Dhabi Escorts Service 0508644382 Escorts in Abu Dhabi
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi EscortsIndian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
Indian Escort in Abu DHabi 0508644382 Abu Dhabi Escorts
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.Meaning of On page SEO & its process in detail.
Meaning of On page SEO & its process in detail.
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 

Client-Side Web Development - An Overview

  • 1. GD 2017/18 - Apresentação e Regras de Avaliação 1Carlos J. Costa (ISEG) Client-Side Web Development An Overview Carlos J. Costa, Ph.D.
  • 2. Carlos J. Costa (ISEG) - 2018
  • 3. Carlos J. Costa (ISEG) - 2018 HTML, CSS & Javascript
  • 4. Carlos J. Costa (ISEG) - 2018 HTML  Hypertext Markup Language,  Standard language used to access and show Web Pages  HTML code is interpreted by a browser that shows results to users  HTML language is composed of tags and text
  • 5. Carlos J. Costa (ISEG) - 2018 How to write...  Start with <!DOCTYPE html> Do not forget <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> What Program should I use?
  • 6. Carlos J. Costa (ISEG) - 2018 HTML <!DOCTYPE html> <html> <head> <title>Page title</title> </head> <body> Page Content </body> </html>
  • 7. Carlos J. Costa (ISEG) - 2018 Improving  Elements  Hyperlinks  Images  ...
  • 8. Carlos J. Costa (ISEG) - 2018 Forms Example <form method="post" action="test.php"> <p> ----- Register -----</p> <p> <input type"text" name="name" size="15" maxlenght="15"> <input type"text" name="name" size="15" maxlenght="15"> </p> <p><input type"text" name="name" size="40" maxlenght="40"></p> <p><input type"text" name="name" size="40" maxlenght="40"></p> <input type="submit" value="Register"> </form>
  • 9. Carlos J. Costa (ISEG) - 2018 HTML Attribute:  Id - This attribute assigns a name to an element. This name must be unique in a document.  Class - This attribute assigns a class name or set of class names to an element.  Style - This attribute specifies style information for the current element.  <P id="myparagraph">paragraph.</P>
  • 10. Carlos J. Costa (ISEG) - 2018 CSS  Cascade Style Sheet  Customize webpage presentation  Definition of rules  Rules may be: − head − inline − separated file  If used a separated file, this file may be shared by several HTML pages
  • 11. Carlos J. Costa (ISEG) - 2018 CSS  Define rule: element { atribute1:value1; atribute2: value2; ...}  Example : H1{ font-size: 36 }
  • 12. Carlos J. Costa (ISEG) - 2018 CSS  Inline <p style="color:blue;margin-left:20px;">This paragraph.</p>
  • 13. Carlos J. Costa (ISEG) - 2018 CSS  In the head <head> <style> body {background-color:yellow;} p {color:blue;} </style> </head>
  • 14. Carlos J. Costa (ISEG) - 2018 CSS  In a separated file: <head> <link rel="stylesheet" type="text/css" href="formatos.css"> </head>
  • 15. Carlos J. Costa (ISEG) - 2018 Javascript  JavaScript (often shortened to JS) is a language that has the following characteristics: − lightweight, − interpreted, − object-oriented with first-class functions, − prototype-based, − dynamic − multi-paradigm (and supports object-oriented, imperative, and functional programming styles).  Most known as the scripting language for Web pages, but used in many non-browser environments as well such as:
  • 16. Carlos J. Costa (ISEG) - 2018 Javascript • Create web page – In the Body • Execute code <script>...</script> • Call Function – In the head • Functions are declared <script>...</script> – Separated File • Functions are declared
  • 17. Carlos J. Costa (ISEG) - 2018 <!DOCTYPE html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <script> function teste(){ alert("Hello!"); } </script> </head> <body> <button onclick="teste()">show</button> <img style="position:absolute; top:50px; left:100px;" src="boneco.jpg"/> </body> </html> Javascript
  • 18. Carlos J. Costa (ISEG) - 2018 <!DOCTYPE html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <script> function teste(){ var a=document.getElementById("b1").style.top; alert(a); } </script> </head> <body> <button onclick="teste()">show</button> <img id="b1"style="position:absolute;top:50px;left:100px;"src="boneco.jpg"/> </body> </html> Javascript
  • 19. Carlos J. Costa (ISEG) - 2018 Javascript • Print the current date in a div called “b2” document.getElementById("b2").innerHTML = Date(); • Convert the text content into a integer content. var a=parseInt(b); • What is the operator to concatenate? +
  • 20. Carlos J. Costa (ISEG) - 2018 <!DOCTYPE html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <script> function teste(){ document.getElementById("b2").innerHTML = Date(); } </script> </head> <body> <button onclick="teste()">print date</button> <div id="b2">...</div> </body> </html> Javascript
  • 21. Carlos J. Costa (ISEG) - 2018 <!DOCTYPE html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <script> function teste(){ var a=document.getElementById("b1").style.top; var a=parseInt(a)+10; if (a>500){a=500}; document.getElementById("b1").style.top=a+"px"; } </script> </head> <body> <button onclick="teste()">moving</button> <img id="b1" style="position:absolute; top:50px; left:100px;" src="boneco.jpg" /> </body> </html> Javascript
  • 22. Carlos J. Costa (ISEG) - 2018 Javascript Stop if reach 300 px from the top
  • 23. Carlos J. Costa (ISEG) - 2018 Javascript <!DOCTYPE html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <script> function teste(){ var a=document.getElementById("b1").style.top; var a=parseInt(a)+10; document.getElementById("b1").style.top=a+"px"; } </script> </head> <body> <button onclick="teste()">moving</button> <img id="b1" style="position:absolute; top:50px; left:100px;" src="boneco.jpg" /> </body> </html>
  • 24. Carlos J. Costa (ISEG) - 2018 Javascript
  • 25. Carlos J. Costa (ISEG) - 2018 Web development
  • 26. Carlos J. Costa (ISEG) - 2018 Web development
  • 27. Carlos J. Costa (ISEG) - 2018 Web development
  • 28. Carlos J. Costa (ISEG) - 2018 Web development
  • 29. Carlos J. Costa (ISEG) - 2018 Web development
  • 30. Carlos J. Costa (ISEG) - 2018 Users?
  • 31. Carlos J. Costa (ISEG) - 2018 Bibliography  http://www.w3.org/TR/html401/struct/global.html  https://developer.mozilla.org/en-US/docs/Web/JavaScript  http://www.w3schools.com  Costa, C. J. (2007). Desenvolvimento para web. ITML press