SlideShare a Scribd company logo
PHP, MYSQL, JAVASCRIPT
CHAPTER 2 – HTML & CSS
INTRODUCTION
• How to create web page in HTML
• How to include HTML tags that every page must have
• How to use links in your web pages
• How to organize a page with paragraphs and line breaks
• How to organize your content with headings
• How to use the semantic elements of HTML5
• How to begin using basic CSS
HTML
• <header>
• <section>
• <article>
• <nav>
• <aside>
• <footer>
<!DOCTYPE html>
<html lang=“en”>
<head>
<title>The First Web Page</title>
</head>
<body>
<p>
In the beginning, Tim created the HyperText Markup Lanuage. The
Internet as without form and void, and text was upon the face of
the monitor and the Hands of Tim were moving over the face of the
keyboard.
</p>
</body>
</html>
Save this in a text editor and open with a browser.
HTML TAGS EXPLAINED
• Opening tag - <html>
• Closing tag - </html>
• Empty tag - <br> - no closing tag
• Head – not displayed in the browser window
• Body – displayed in browser window
LINKS
• On virtually all web pages
• <a> tag
• href attribute (hypertext reference)
• Absolute or relative
• Relative pages are within the web server root folder
• <a href=“/elephants/african.html”>Learn about African elephants.</a>
LINKING WITHIN A PAGE
• a stands for “anchor”
• <a name=“top”></a>
• <a href=“#top”>Go to top of page</a>
LINKING TO EXTERNAL CONTENT
• Use absolute reference
• <a href=“http://www.google.com/”>Go to Google</a>
• <a href=“http://thezoo.com/elephants/african.html#photos”>
• <a href=“/elephants/african.html#photos”>
LINK TO EMAIL ADDRESS
• <a href=“mailto:dan@woosters.org”>Send me an email</a>
PARAGRAPHS AND LINE BREAKS
• <!DOCTYPE html>
• <html lang=“en”>
• <head>
• <title>The Ad Agency Song</title>
• </head>
• <body>
• <p>
• When your client’s hopping mad,
• put his picture in the ad.
• If he still should prove refractory,
• add a picture of his factory.
• </p>
• <hr>
• <p>
• When your client’s hopping mad,<br>
• put his picture in the ad.
• </p>
• <p>
• If he still should prove refractory,<br>
• add a picture of his factory.
• </p>
• </html>
HEADINGS
• <!DOCTYPE html>
• <html lang=“en”>
• <head>
• <title>My Widgets</title>
• </head>
• <body>
• <h1>My Widgets</h1>
• <p>My widgets are the best in the lang. Continue reading to learn more
about my widgets.</p>
• <h2>Widget Features</h2>
• <p>If I had an features I’d put them right here</p>
• <h3>Pricing</h3>
• <p>Talk about pricing here.</p>
• </body>
• </html>
SEMANTIC ELEMENTS IN HTML – USEFUL
FOR ORGANIZING YOUR PAGES
• <header></header>
• <footer></footer>
• <nav></nav>
• <section></section>
• <article></article>
• <aside></aside>
• Example on pages 43 & 44
HOW CSS WORKS
• Cascading Style Sheets
• Specifies fonts, colors, line spacing, margins, borders and other
things to define the look and feel of your pages
• Can be internal (within the html page) or external – a separate
file
• Style rule - a formatting instruction that can be applied to an
element on a page such as paragraph of text or a link
LEARNING CSS
• https://www.youtube.com/watch?v=Wz2klMXDqF4
• http://www.littlewebhut.com/
• https://www.w3schools.com/default.asp
CHANGE THE COLOR OF ALL <P> ELEMENTS TO
"RED"
• <!DOCTYPE html>
• <html>
• <head>
• <style>
• p {
• color: red;
• }
• </style>
• </head>
• <body>
• <h1>This is a Heading</h1>
• <p>This is a paragraph.</p>
• <p>This is another paragraph.</p>
• </body>
• </html>
CHANGE THE COLOR OF THE ELEMENT WITH ID="PARA1", TO
"RED"
• <!DOCTYPE html>
• <html>
• <head>
• <style>
• #para1 {
• color: red;
• }
• </style>
• </head>
• <body>
• <h1>This is a Heading</h1>
• <p id="para1">This is a paragraph.</p>
• <p>This is another paragraph.</p>
• </body>
• </html>
CHANGE THE COLOR OF ALL ELEMENTS WITH THE CLASS "COLORTEXT", TO
"RED"
• <!DOCTYPE html>
• <html>
• <head>
• <style>
• .colortext {
• color: red;
• }
• </style>
• </head>
• <body>
• <h1>This is a Heading</h1>
• <p>This is a paragraph.</p>
• <p class="colortext">This is another paragraph.</p>
• <p class="colortext">This is also a paragraph.</p>
• </body>
• </html>
CHANGE THE COLOR OF ALL <P> AND <H1> ELEMENTS, TO "RED".
GROUP THE SELECTORS TO MINIMIZE CODE.
• <!DOCTYPE html>
• <html>
• <head>
• <style>
• h1, p {
• color: red;
• }
• </style>
• </head>
• <body>
• <h1>This is a heading</h1>
• <h2>This is a smaller heading</h2>
• <p>This is a paragraph.</p>
• <p>This is another paragraph.</p>
• </body>
• </html>
ADD AN EXTERNAL STYLE SHEET WITH THE URL: "MYSTYLE.CSS".
• <!DOCTYPE html>
• <html>
• <head>
• <link rel="stylesheet" type="text/css" href="mystyle.css">
• </head>
• <body>
• <h1>This is a Heading</h1>
• <p>This is a paragraph.</p>
• <p>This is another paragraph.</p>
• </body>
• </html>
SET "BACKGROUND-COLOR: LINEN" FOR THE PAGE, USING AN INTERNAL STYLE
SHEET.
• <!DOCTYPE html>
• <html>
• <head>
• <style>
• body {
• background-color: linen;
• }
• </style>
• </head>
• <body>
• <h1>This is a Heading</h1>
• <p>This is a paragraph.</p>
• <p>This is another paragraph.</p>
• </body>
• </html>
SET "BACKGROUND-COLOR: LINEN" FOR THE PAGE, USING AN INLINE STYLE.
• <!DOCTYPE html>
• <html>
• <head>
• </head>
• <body style="background-color: linen">
• <h1>This is a Heading</h1>
• <p>This is a paragraph.</p>
• <p>This is another paragraph.</p>
• </body>
• </html>
SET THE BACKGROUND COLOR FOR THE PAGE TO "LINEN"
AND THE BACKGROUND COLOR FOR <H1> TO "LIGHTBLUE".
• <style>
• body {
• background-color: linen;
• }
• h1 {
• background-color: lightblue;
• }
• </style>
SET "PAPER.GIF" AS THE BACKGROUND IMAGE OF THE PAGE.
• <style>
• body {
• background-image: url("paper.gif");
• }
• </style>
SET "GRADIENT_BG_VERTICAL.PNG" AS THE BACKGROUND IMAGE OF THE
PAGE,
AND REPEAT IT VERTICALLY ONLY.
• <style>
• body {
• background-image: url("gradient_bg_vertical.png");
• background-repeat: repeat-y;
• }
• </style>
SPECIFY THAT THE BACKGROUND IMAGE SHOULD BE SHOWN ONCE,
IN THE TOP RIGHT CORNER.
• <style>
• body {
• background-image: url("img_tree.png");
• background-repeat: no-repeat;
• background-position: top right;
• }
• </style>
USE THE SHORTHAND BACKGROUND PROPERTY TO SET BACKGROUND IMAGE
TO "IMG_TREE.PNG", SHOW IT ONCE, IN THE TOP RIGHT CORNER.
• <style>
• body {
• background: url("img_tree.png") no-repeat top right;
• }
• </style>
W3SCHOOLS.COM
• Borders -
https://www.w3schools.com/css/exercise.asp?filename=exercise_borde
r1
• Margin -
https://www.w3schools.com/css/exercise.asp?filename=exercise_margi
n1
• Padding -
https://www.w3schools.com/css/exercise.asp?filename=exercise_paddi
ng1
VALIDATE YOUR CSS CODE
• https://jigsaw.w3.org/css-validator/

More Related Content

What's hot

HTML all tags .........its to much helpful for beginners
HTML all tags .........its to much helpful for beginners HTML all tags .........its to much helpful for beginners
HTML all tags .........its to much helpful for beginners
Nimrakhan89
 
Ejemplo basico de frames
Ejemplo basico de framesEjemplo basico de frames
Ejemplo basico de frames
Fredy Cajma
 
Haml. New HTML? (RU)
Haml. New HTML? (RU)Haml. New HTML? (RU)
Haml. New HTML? (RU)
Kirill Zonov
 
Html in a box
Html in a boxHtml in a box
Html in a box
bdubuque
 
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
Kunle Campbell
 
All About HTML Tags
All About HTML TagsAll About HTML Tags
All About HTML Tags
Performics.Convonix
 
Learn html through programs
Learn html through programsLearn html through programs
Learn html through programs
Thiruvikraman Ramadoss
 
Artdm171 Week4 Tags
Artdm171 Week4 TagsArtdm171 Week4 Tags
Artdm171 Week4 Tags
Gilbert Guerrero
 
HTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginnersHTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginners
PrakritiDhang
 
poornamatha : poornamitham poornath-poorna-muthatchyathe |
poornamatha :  poornamitham poornath-poorna-muthatchyathe |poornamatha :  poornamitham poornath-poorna-muthatchyathe |
poornamatha : poornamitham poornath-poorna-muthatchyathe |
ashokha
 
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessiblerole=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
eROI
 
Completion - App Coding - My Deadlines
Completion - App Coding - My DeadlinesCompletion - App Coding - My Deadlines
Completion - App Coding - My Deadlines
Team_Conscientia
 
Html bangla
Html banglaHtml bangla
Html bangla
bhorerpakhi
 
Html&css pp
Html&css ppHtml&css pp
Html&css pp
jeckman1360
 
#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]
Dalibor Gogic
 
Bangla html
Bangla htmlBangla html
Bangla html
Shopnomoy Prantor
 
CSS Frameworks
CSS FrameworksCSS Frameworks
CSS Frameworks
Mike Crabb
 
Critical Rendering Path
Critical Rendering PathCritical Rendering Path
Critical Rendering Path
BarbaraFellner1
 
Web design
Web designWeb design
Web design
Max Friel
 

What's hot (20)

6. CSS
6. CSS6. CSS
6. CSS
 
HTML all tags .........its to much helpful for beginners
HTML all tags .........its to much helpful for beginners HTML all tags .........its to much helpful for beginners
HTML all tags .........its to much helpful for beginners
 
Ejemplo basico de frames
Ejemplo basico de framesEjemplo basico de frames
Ejemplo basico de frames
 
Haml. New HTML? (RU)
Haml. New HTML? (RU)Haml. New HTML? (RU)
Haml. New HTML? (RU)
 
Html in a box
Html in a boxHtml in a box
Html in a box
 
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
Advanced SEO Tactics to Fix Duplicate Content in eCommerce [ 2X eCommerce Web...
 
All About HTML Tags
All About HTML TagsAll About HTML Tags
All About HTML Tags
 
Learn html through programs
Learn html through programsLearn html through programs
Learn html through programs
 
Artdm171 Week4 Tags
Artdm171 Week4 TagsArtdm171 Week4 Tags
Artdm171 Week4 Tags
 
HTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginnersHTML, CSS, JavaScript for beginners
HTML, CSS, JavaScript for beginners
 
poornamatha : poornamitham poornath-poorna-muthatchyathe |
poornamatha :  poornamitham poornath-poorna-muthatchyathe |poornamatha :  poornamitham poornath-poorna-muthatchyathe |
poornamatha : poornamitham poornath-poorna-muthatchyathe |
 
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessiblerole=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
role=drinks AMS Meetup: 5 Pro Tips for Making Your Email More Accessible
 
Completion - App Coding - My Deadlines
Completion - App Coding - My DeadlinesCompletion - App Coding - My Deadlines
Completion - App Coding - My Deadlines
 
Html bangla
Html banglaHtml bangla
Html bangla
 
Html&css pp
Html&css ppHtml&css pp
Html&css pp
 
#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]#3 HTML & CSS [know-how]
#3 HTML & CSS [know-how]
 
Bangla html
Bangla htmlBangla html
Bangla html
 
CSS Frameworks
CSS FrameworksCSS Frameworks
CSS Frameworks
 
Critical Rendering Path
Critical Rendering PathCritical Rendering Path
Critical Rendering Path
 
Web design
Web designWeb design
Web design
 

Similar to Upstate CSCI 450 WebDev Chapter 2

VAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptxVAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV481101
 
Learning html & dhtml
Learning html & dhtmlLearning html & dhtml
Learning html & dhtml
Rudresh Shrivastav
 
Cv
CvCv
Introduction To HTML
Introduction To HTMLIntroduction To HTML
Introduction To HTML
Mehul Patel
 
HTML.ppt
HTML.pptHTML.ppt
2. CSS Chapter Roadmap and Full Source Code.pdf
2. CSS Chapter Roadmap and Full Source Code.pdf2. CSS Chapter Roadmap and Full Source Code.pdf
2. CSS Chapter Roadmap and Full Source Code.pdf
BdBangladesh
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
danpaquette
 
LEARN HTML IN A DAY
LEARN HTML IN A DAYLEARN HTML IN A DAY
LEARN HTML IN A DAY
AWK Internet Technologies
 
Plan your web site like you plan your parties
Plan your web site like you plan your partiesPlan your web site like you plan your parties
Plan your web site like you plan your parties
Christian Heilmann
 
Presentation of Hyper Text Markup Language
Presentation of Hyper Text Markup LanguagePresentation of Hyper Text Markup Language
Presentation of Hyper Text Markup Language
JohnLagman3
 
html-150424090224-conversion-gate0.2.pdf
html-150424090224-conversion-gate0.2.pdfhtml-150424090224-conversion-gate0.2.pdf
html-150424090224-conversion-gate0.2.pdf
JohnLagman3
 
Html coding
Html codingHtml coding
Html coding
Briana VanBuskirk
 
6. Css
6. Css6. Css
6. Css
Gao Fuyan
 
Basics Of Html
Basics Of HtmlBasics Of Html
Basics Of Html
Sal Baldovinos
 
Session4
Session4Session4
Session4
Denise Garofalo
 
Html
HtmlHtml
BEAUTIFUL CSS PRESENTATION EASY TO MADE
BEAUTIFUL CSS PRESENTATION EASY TO MADEBEAUTIFUL CSS PRESENTATION EASY TO MADE
BEAUTIFUL CSS PRESENTATION EASY TO MADE
rana usman
 
Web Design Course - Lecture 2 - HTML Tag, Element, Attributes
Web Design Course - Lecture 2 - HTML Tag, Element, AttributesWeb Design Course - Lecture 2 - HTML Tag, Element, Attributes
Web Design Course - Lecture 2 - HTML Tag, Element, Attributes
Al-Mamun Sarkar
 
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
Joao Lucas Santana
 
Web-02-HTML.pptx
Web-02-HTML.pptxWeb-02-HTML.pptx
Web-02-HTML.pptx
joeveller
 

Similar to Upstate CSCI 450 WebDev Chapter 2 (20)

VAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptxVAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptx
 
Learning html & dhtml
Learning html & dhtmlLearning html & dhtml
Learning html & dhtml
 
Cv
CvCv
Cv
 
Introduction To HTML
Introduction To HTMLIntroduction To HTML
Introduction To HTML
 
HTML.ppt
HTML.pptHTML.ppt
HTML.ppt
 
2. CSS Chapter Roadmap and Full Source Code.pdf
2. CSS Chapter Roadmap and Full Source Code.pdf2. CSS Chapter Roadmap and Full Source Code.pdf
2. CSS Chapter Roadmap and Full Source Code.pdf
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
LEARN HTML IN A DAY
LEARN HTML IN A DAYLEARN HTML IN A DAY
LEARN HTML IN A DAY
 
Plan your web site like you plan your parties
Plan your web site like you plan your partiesPlan your web site like you plan your parties
Plan your web site like you plan your parties
 
Presentation of Hyper Text Markup Language
Presentation of Hyper Text Markup LanguagePresentation of Hyper Text Markup Language
Presentation of Hyper Text Markup Language
 
html-150424090224-conversion-gate0.2.pdf
html-150424090224-conversion-gate0.2.pdfhtml-150424090224-conversion-gate0.2.pdf
html-150424090224-conversion-gate0.2.pdf
 
Html coding
Html codingHtml coding
Html coding
 
6. Css
6. Css6. Css
6. Css
 
Basics Of Html
Basics Of HtmlBasics Of Html
Basics Of Html
 
Session4
Session4Session4
Session4
 
Html
HtmlHtml
Html
 
BEAUTIFUL CSS PRESENTATION EASY TO MADE
BEAUTIFUL CSS PRESENTATION EASY TO MADEBEAUTIFUL CSS PRESENTATION EASY TO MADE
BEAUTIFUL CSS PRESENTATION EASY TO MADE
 
Web Design Course - Lecture 2 - HTML Tag, Element, Attributes
Web Design Course - Lecture 2 - HTML Tag, Element, AttributesWeb Design Course - Lecture 2 - HTML Tag, Element, Attributes
Web Design Course - Lecture 2 - HTML Tag, Element, Attributes
 
Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)Desenvolvimento web com Ruby on Rails (parte 2)
Desenvolvimento web com Ruby on Rails (parte 2)
 
Web-02-HTML.pptx
Web-02-HTML.pptxWeb-02-HTML.pptx
Web-02-HTML.pptx
 

More from DanWooster1

Upstate CSCI 540 Agile Development
Upstate CSCI 540 Agile DevelopmentUpstate CSCI 540 Agile Development
Upstate CSCI 540 Agile Development
DanWooster1
 
Upstate CSCI 540 Unit testing
Upstate CSCI 540 Unit testingUpstate CSCI 540 Unit testing
Upstate CSCI 540 Unit testing
DanWooster1
 
Upstate CSCI 450 WebDev Chapter 9
Upstate CSCI 450 WebDev Chapter 9Upstate CSCI 450 WebDev Chapter 9
Upstate CSCI 450 WebDev Chapter 9
DanWooster1
 
Upstate CSCI 450 WebDev Chapter 4
Upstate CSCI 450 WebDev Chapter 4Upstate CSCI 450 WebDev Chapter 4
Upstate CSCI 450 WebDev Chapter 4
DanWooster1
 
Upstate CSCI 450 WebDev Chapter 4
Upstate CSCI 450 WebDev Chapter 4Upstate CSCI 450 WebDev Chapter 4
Upstate CSCI 450 WebDev Chapter 4
DanWooster1
 
Upstate CSCI 450 WebDev Chapter 3
Upstate CSCI 450 WebDev Chapter 3Upstate CSCI 450 WebDev Chapter 3
Upstate CSCI 450 WebDev Chapter 3
DanWooster1
 
Upstate CSCI 450 WebDev Chapter 1
Upstate CSCI 450 WebDev Chapter 1Upstate CSCI 450 WebDev Chapter 1
Upstate CSCI 450 WebDev Chapter 1
DanWooster1
 
Upstate CSCI 525 Data Mining Chapter 3
Upstate CSCI 525 Data Mining Chapter 3Upstate CSCI 525 Data Mining Chapter 3
Upstate CSCI 525 Data Mining Chapter 3
DanWooster1
 
Upstate CSCI 525 Data Mining Chapter 2
Upstate CSCI 525 Data Mining Chapter 2Upstate CSCI 525 Data Mining Chapter 2
Upstate CSCI 525 Data Mining Chapter 2
DanWooster1
 
Upstate CSCI 525 Data Mining Chapter 1
Upstate CSCI 525 Data Mining Chapter 1Upstate CSCI 525 Data Mining Chapter 1
Upstate CSCI 525 Data Mining Chapter 1
DanWooster1
 
Upstate CSCI 200 Java Chapter 8 - Arrays
Upstate CSCI 200 Java Chapter 8 - ArraysUpstate CSCI 200 Java Chapter 8 - Arrays
Upstate CSCI 200 Java Chapter 8 - Arrays
DanWooster1
 
Upstate CSCI 200 Java Chapter 7 - OOP
Upstate CSCI 200 Java Chapter 7 - OOPUpstate CSCI 200 Java Chapter 7 - OOP
Upstate CSCI 200 Java Chapter 7 - OOP
DanWooster1
 
CSCI 200 Java Chapter 03 Using Classes
CSCI 200 Java Chapter 03 Using ClassesCSCI 200 Java Chapter 03 Using Classes
CSCI 200 Java Chapter 03 Using Classes
DanWooster1
 
CSCI 200 Java Chapter 02 Data & Expressions
CSCI 200 Java Chapter 02 Data & ExpressionsCSCI 200 Java Chapter 02 Data & Expressions
CSCI 200 Java Chapter 02 Data & Expressions
DanWooster1
 
CSCI 200 Java Chapter 01
CSCI 200 Java Chapter 01CSCI 200 Java Chapter 01
CSCI 200 Java Chapter 01
DanWooster1
 
CSCI 238 Chapter 08 Arrays Textbook Slides
CSCI 238 Chapter 08 Arrays Textbook SlidesCSCI 238 Chapter 08 Arrays Textbook Slides
CSCI 238 Chapter 08 Arrays Textbook Slides
DanWooster1
 
Chapter 6 - More conditionals and loops
Chapter 6 - More conditionals and loopsChapter 6 - More conditionals and loops
Chapter 6 - More conditionals and loops
DanWooster1
 
Upstate CSCI 450 jQuery
Upstate CSCI 450 jQueryUpstate CSCI 450 jQuery
Upstate CSCI 450 jQuery
DanWooster1
 
Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13
DanWooster1
 
Upstate CSCI 450 PHP
Upstate CSCI 450 PHPUpstate CSCI 450 PHP
Upstate CSCI 450 PHP
DanWooster1
 

More from DanWooster1 (20)

Upstate CSCI 540 Agile Development
Upstate CSCI 540 Agile DevelopmentUpstate CSCI 540 Agile Development
Upstate CSCI 540 Agile Development
 
Upstate CSCI 540 Unit testing
Upstate CSCI 540 Unit testingUpstate CSCI 540 Unit testing
Upstate CSCI 540 Unit testing
 
Upstate CSCI 450 WebDev Chapter 9
Upstate CSCI 450 WebDev Chapter 9Upstate CSCI 450 WebDev Chapter 9
Upstate CSCI 450 WebDev Chapter 9
 
Upstate CSCI 450 WebDev Chapter 4
Upstate CSCI 450 WebDev Chapter 4Upstate CSCI 450 WebDev Chapter 4
Upstate CSCI 450 WebDev Chapter 4
 
Upstate CSCI 450 WebDev Chapter 4
Upstate CSCI 450 WebDev Chapter 4Upstate CSCI 450 WebDev Chapter 4
Upstate CSCI 450 WebDev Chapter 4
 
Upstate CSCI 450 WebDev Chapter 3
Upstate CSCI 450 WebDev Chapter 3Upstate CSCI 450 WebDev Chapter 3
Upstate CSCI 450 WebDev Chapter 3
 
Upstate CSCI 450 WebDev Chapter 1
Upstate CSCI 450 WebDev Chapter 1Upstate CSCI 450 WebDev Chapter 1
Upstate CSCI 450 WebDev Chapter 1
 
Upstate CSCI 525 Data Mining Chapter 3
Upstate CSCI 525 Data Mining Chapter 3Upstate CSCI 525 Data Mining Chapter 3
Upstate CSCI 525 Data Mining Chapter 3
 
Upstate CSCI 525 Data Mining Chapter 2
Upstate CSCI 525 Data Mining Chapter 2Upstate CSCI 525 Data Mining Chapter 2
Upstate CSCI 525 Data Mining Chapter 2
 
Upstate CSCI 525 Data Mining Chapter 1
Upstate CSCI 525 Data Mining Chapter 1Upstate CSCI 525 Data Mining Chapter 1
Upstate CSCI 525 Data Mining Chapter 1
 
Upstate CSCI 200 Java Chapter 8 - Arrays
Upstate CSCI 200 Java Chapter 8 - ArraysUpstate CSCI 200 Java Chapter 8 - Arrays
Upstate CSCI 200 Java Chapter 8 - Arrays
 
Upstate CSCI 200 Java Chapter 7 - OOP
Upstate CSCI 200 Java Chapter 7 - OOPUpstate CSCI 200 Java Chapter 7 - OOP
Upstate CSCI 200 Java Chapter 7 - OOP
 
CSCI 200 Java Chapter 03 Using Classes
CSCI 200 Java Chapter 03 Using ClassesCSCI 200 Java Chapter 03 Using Classes
CSCI 200 Java Chapter 03 Using Classes
 
CSCI 200 Java Chapter 02 Data & Expressions
CSCI 200 Java Chapter 02 Data & ExpressionsCSCI 200 Java Chapter 02 Data & Expressions
CSCI 200 Java Chapter 02 Data & Expressions
 
CSCI 200 Java Chapter 01
CSCI 200 Java Chapter 01CSCI 200 Java Chapter 01
CSCI 200 Java Chapter 01
 
CSCI 238 Chapter 08 Arrays Textbook Slides
CSCI 238 Chapter 08 Arrays Textbook SlidesCSCI 238 Chapter 08 Arrays Textbook Slides
CSCI 238 Chapter 08 Arrays Textbook Slides
 
Chapter 6 - More conditionals and loops
Chapter 6 - More conditionals and loopsChapter 6 - More conditionals and loops
Chapter 6 - More conditionals and loops
 
Upstate CSCI 450 jQuery
Upstate CSCI 450 jQueryUpstate CSCI 450 jQuery
Upstate CSCI 450 jQuery
 
Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13Upstate CSCI 450 PHP Chapters 5, 12, 13
Upstate CSCI 450 PHP Chapters 5, 12, 13
 
Upstate CSCI 450 PHP
Upstate CSCI 450 PHPUpstate CSCI 450 PHP
Upstate CSCI 450 PHP
 

Recently uploaded

A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 

Recently uploaded (20)

A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 

Upstate CSCI 450 WebDev Chapter 2

  • 2. INTRODUCTION • How to create web page in HTML • How to include HTML tags that every page must have • How to use links in your web pages • How to organize a page with paragraphs and line breaks • How to organize your content with headings • How to use the semantic elements of HTML5 • How to begin using basic CSS
  • 3. HTML • <header> • <section> • <article> • <nav> • <aside> • <footer>
  • 4. <!DOCTYPE html> <html lang=“en”> <head> <title>The First Web Page</title> </head> <body> <p> In the beginning, Tim created the HyperText Markup Lanuage. The Internet as without form and void, and text was upon the face of the monitor and the Hands of Tim were moving over the face of the keyboard. </p> </body> </html> Save this in a text editor and open with a browser.
  • 5. HTML TAGS EXPLAINED • Opening tag - <html> • Closing tag - </html> • Empty tag - <br> - no closing tag • Head – not displayed in the browser window • Body – displayed in browser window
  • 6. LINKS • On virtually all web pages • <a> tag • href attribute (hypertext reference) • Absolute or relative • Relative pages are within the web server root folder • <a href=“/elephants/african.html”>Learn about African elephants.</a>
  • 7. LINKING WITHIN A PAGE • a stands for “anchor” • <a name=“top”></a> • <a href=“#top”>Go to top of page</a>
  • 8. LINKING TO EXTERNAL CONTENT • Use absolute reference • <a href=“http://www.google.com/”>Go to Google</a> • <a href=“http://thezoo.com/elephants/african.html#photos”> • <a href=“/elephants/african.html#photos”>
  • 9. LINK TO EMAIL ADDRESS • <a href=“mailto:dan@woosters.org”>Send me an email</a>
  • 10. PARAGRAPHS AND LINE BREAKS • <!DOCTYPE html> • <html lang=“en”> • <head> • <title>The Ad Agency Song</title> • </head> • <body> • <p> • When your client’s hopping mad, • put his picture in the ad. • If he still should prove refractory, • add a picture of his factory. • </p> • <hr> • <p> • When your client’s hopping mad,<br> • put his picture in the ad. • </p> • <p> • If he still should prove refractory,<br> • add a picture of his factory. • </p> • </html>
  • 11. HEADINGS • <!DOCTYPE html> • <html lang=“en”> • <head> • <title>My Widgets</title> • </head> • <body> • <h1>My Widgets</h1> • <p>My widgets are the best in the lang. Continue reading to learn more about my widgets.</p> • <h2>Widget Features</h2> • <p>If I had an features I’d put them right here</p> • <h3>Pricing</h3> • <p>Talk about pricing here.</p> • </body> • </html>
  • 12. SEMANTIC ELEMENTS IN HTML – USEFUL FOR ORGANIZING YOUR PAGES • <header></header> • <footer></footer> • <nav></nav> • <section></section> • <article></article> • <aside></aside> • Example on pages 43 & 44
  • 13. HOW CSS WORKS • Cascading Style Sheets • Specifies fonts, colors, line spacing, margins, borders and other things to define the look and feel of your pages • Can be internal (within the html page) or external – a separate file • Style rule - a formatting instruction that can be applied to an element on a page such as paragraph of text or a link
  • 14. LEARNING CSS • https://www.youtube.com/watch?v=Wz2klMXDqF4 • http://www.littlewebhut.com/ • https://www.w3schools.com/default.asp
  • 15. CHANGE THE COLOR OF ALL <P> ELEMENTS TO "RED" • <!DOCTYPE html> • <html> • <head> • <style> • p { • color: red; • } • </style> • </head> • <body> • <h1>This is a Heading</h1> • <p>This is a paragraph.</p> • <p>This is another paragraph.</p> • </body> • </html>
  • 16. CHANGE THE COLOR OF THE ELEMENT WITH ID="PARA1", TO "RED" • <!DOCTYPE html> • <html> • <head> • <style> • #para1 { • color: red; • } • </style> • </head> • <body> • <h1>This is a Heading</h1> • <p id="para1">This is a paragraph.</p> • <p>This is another paragraph.</p> • </body> • </html>
  • 17. CHANGE THE COLOR OF ALL ELEMENTS WITH THE CLASS "COLORTEXT", TO "RED" • <!DOCTYPE html> • <html> • <head> • <style> • .colortext { • color: red; • } • </style> • </head> • <body> • <h1>This is a Heading</h1> • <p>This is a paragraph.</p> • <p class="colortext">This is another paragraph.</p> • <p class="colortext">This is also a paragraph.</p> • </body> • </html>
  • 18. CHANGE THE COLOR OF ALL <P> AND <H1> ELEMENTS, TO "RED". GROUP THE SELECTORS TO MINIMIZE CODE. • <!DOCTYPE html> • <html> • <head> • <style> • h1, p { • color: red; • } • </style> • </head> • <body> • <h1>This is a heading</h1> • <h2>This is a smaller heading</h2> • <p>This is a paragraph.</p> • <p>This is another paragraph.</p> • </body> • </html>
  • 19. ADD AN EXTERNAL STYLE SHEET WITH THE URL: "MYSTYLE.CSS". • <!DOCTYPE html> • <html> • <head> • <link rel="stylesheet" type="text/css" href="mystyle.css"> • </head> • <body> • <h1>This is a Heading</h1> • <p>This is a paragraph.</p> • <p>This is another paragraph.</p> • </body> • </html>
  • 20. SET "BACKGROUND-COLOR: LINEN" FOR THE PAGE, USING AN INTERNAL STYLE SHEET. • <!DOCTYPE html> • <html> • <head> • <style> • body { • background-color: linen; • } • </style> • </head> • <body> • <h1>This is a Heading</h1> • <p>This is a paragraph.</p> • <p>This is another paragraph.</p> • </body> • </html>
  • 21. SET "BACKGROUND-COLOR: LINEN" FOR THE PAGE, USING AN INLINE STYLE. • <!DOCTYPE html> • <html> • <head> • </head> • <body style="background-color: linen"> • <h1>This is a Heading</h1> • <p>This is a paragraph.</p> • <p>This is another paragraph.</p> • </body> • </html>
  • 22. SET THE BACKGROUND COLOR FOR THE PAGE TO "LINEN" AND THE BACKGROUND COLOR FOR <H1> TO "LIGHTBLUE". • <style> • body { • background-color: linen; • } • h1 { • background-color: lightblue; • } • </style>
  • 23. SET "PAPER.GIF" AS THE BACKGROUND IMAGE OF THE PAGE. • <style> • body { • background-image: url("paper.gif"); • } • </style>
  • 24. SET "GRADIENT_BG_VERTICAL.PNG" AS THE BACKGROUND IMAGE OF THE PAGE, AND REPEAT IT VERTICALLY ONLY. • <style> • body { • background-image: url("gradient_bg_vertical.png"); • background-repeat: repeat-y; • } • </style>
  • 25. SPECIFY THAT THE BACKGROUND IMAGE SHOULD BE SHOWN ONCE, IN THE TOP RIGHT CORNER. • <style> • body { • background-image: url("img_tree.png"); • background-repeat: no-repeat; • background-position: top right; • } • </style>
  • 26. USE THE SHORTHAND BACKGROUND PROPERTY TO SET BACKGROUND IMAGE TO "IMG_TREE.PNG", SHOW IT ONCE, IN THE TOP RIGHT CORNER. • <style> • body { • background: url("img_tree.png") no-repeat top right; • } • </style>
  • 27. W3SCHOOLS.COM • Borders - https://www.w3schools.com/css/exercise.asp?filename=exercise_borde r1 • Margin - https://www.w3schools.com/css/exercise.asp?filename=exercise_margi n1 • Padding - https://www.w3schools.com/css/exercise.asp?filename=exercise_paddi ng1
  • 28. VALIDATE YOUR CSS CODE • https://jigsaw.w3.org/css-validator/