SlideShare a Scribd company logo
A Rails Girls Introduction
to
HTML & CSS
Rails Girls Helsinki, Finland, Spring 2015
Timo Herttua & Vesa Vänskä
Agenda
1. Why HTML & CSS are crucial in life?
2. Why HTML & CSS are crucial in RG?
3. Bonus: Why to learn them already today and not
tomorrow
4. Division of Labor on the Internet
5. The Front-end Bentobox
6. Live demo: Codeacademy
7. Extra credit exercise
8. Appendix: instructions, HTML primer, Frontend
Bentobox
Why HTML & CSS
● Perhaps the single most important, and easiest to grasp entry point to
the world of web tech
○ WYSIVCTWYG or “What you see is very close to what you get”
● Many of today’s professional developers started with making websites
● The other entry point you typically hear is computer graphics (CG) and/or
games (i.e. the Finnish Demoscene*) – which are much more difficult to
make than websites
● The third, and perhaps hardest entry point, is tinkering with hardware (e.g.
Commodore, Amiga, Arduino, Raspberry Pi, drones, robots, etc.), because
of so many moving parts and “low level” programming languages
involved
*Wikipedia article about the Demoscene: http://en.wikipedia.org/wiki/Demoscene; A Finnish TV series about the Demoscene: http://areena.yle.
fi/tv/demoscene; Grand Cru’s account of the Demoscene: http://grandcrugames.com/2013/03/what-the-hll-is-in-the-water-of-finland/
HTML & CSS in the Internet
● Close to everything you see on the internet is a
combination of HTML, CSS & JavaScript
● Even some apps on iOS & Andoid are made with them
(e.g. Facebook’s first gen mobile)
● Web browser is the universal app that everyone has
● HTML, CSS & JS are the language of the web, and the
web browsers
● HTML, CSS & JS are open source standards, meaning
that no plugins are required to run them
Role of HTML & CSS in Rails Girls
● Rails Girls is an introduction to (web application)
technology
● Rails in Rails Girls refers to “Ruby on Rails”, a popular
web application programming framework (Rails) built
with the Ruby programming language
● Web applications are pieces of software that
dynamically generate HTML pages that make further
use of CSS and JavaScript to make them more visually
pleasing and interactive
Today: HTML; tomorrow: (among other
things) dynamic generation of HTML
● Web applications are used to transmit and transform
information by dynamically generating HTML based
on user inputs (e.g. Facebook’s chat)
● In order to understand web applications, you need to
understand HTML
● In order to make web applications pretty, you need
CSS
● In order to make web applications more interactive /
responsive, you need JavaScript
A bonus “why”
● By engaging with HTML & CSS today, you’ll
increase your chances of getting access to
a personal coach for a 3-6 month period to
help you enter the world of web tech in great
company!
● Details on how exactly, stay tuned for more
info later in the presentation
What is a website made of?
● An HTML page is
○ a structured text file with hyperlinks
■ to other HTML pages
■ to assets, such as
● embedded files, that the browser can display, such as
○ images
○ videos
○ audio
● CSS stylesheets
● script files (JavaScript)
● downloadable files such as PDF’s,
A website, “visually”
<html>
<head>
<title>Google</title>
<link rel="stylesheet" type="text/css" href="
/style/style.css">
</head>
<body>
<div id="logo" style="/images/logo.png"></div>
<input id="keywords">
<button id="search">Google Search</button>
<button id="lucky">I'm Feeling Lucky</button>
</body>
</html>
HTML: http://www.google.com/index.html
or just http://google.com
body {
background-color: white;
}
button {
background-color: light grey;
}
Stylesheet: style.css
Google logo: logo.png
Connected devices such as
smart TV’s
Clients and servers
Server (a.k.a backend a.k.a. the cloud)
Desktop web browser
Mobile device web browser &
embedded browsers in
“hybrid apps”
Client (a.k.a frontend) examples:
The cloud (=many
servers someone else
like Amazon or Google
owns, priced per usage
per month, not per
physical server)
Structured data
(HTML, JSON, XML, …)
HTTP request - response cycle
Browser Server
1. Request to http://google.com
2. Server decides what it
wants to respond
Web
page
3. The response tells the
browser what to show in the
browser
4. The browser renders the
page
Division of labor on the Internet
For browsers:
HTML
<h1>This is a heading</h1>
<p>This is a paragraph</p>
<img src=”cat_picture.gif” />
<video><source src=" cat_video.mp4"
type="video/mp4"></video>
For JS / servers:
JSON / XML
{“presenters”: [{“id”:
1, “name”: “Vesa”},
{“id”: 2, “name”:
“Timo”}]}
Structured content
CSS
body {
background-color: red;
};
JavaScript
confirm(“Are you ready
for some cat vids?”);
// OK or Cancel
Adobe
Flash
Microsoft
Silverlight
...
The Browser (=frontend)
(e.g. Chrome, Firefox, Safari, ..)
Style & behavior
Rails, CakePHP, Django, Spring
Ruby, PHP, Python, Java
Frameworks
(=productivity tools by programmers for
programmers)
Languages
(=ways to instruct machines)
The Server
(=backend)
(proprietary)
Browser plugins
What was all that Confucianism?
The Rails Girls workshop
uses the Bentobox model
to make the world of tech
more approachable by
helping you attach
meaning to the many
acronyms of tech (HTML,
JS, CSS, etc.)
Read more:
http://blog.railsgirls.com/post/20405930015/bentobox-learn-the-language-of-technology
Using the Bentobox today
Frontend Bentobox
Backend
(tomorrow’s subject)
Frontend Bentobox
The Browser (=frontend)
The Frontend Bentobox
The Server (=backend)
(i.e. “not frontend” stuff)
Behavior
Style
Content for browsers Content for servers / backend
Frontend Bentobox
The Browser (=frontend)
The Frontend Bentobox: acronyms
The Server (=backend)
(i.e. “not frontend” stuff)
Behavior
Style
Content for browsers Content for servers / backend
HTML
<h1>This is a heading</h1>
<p>This is a paragraph</p>
<img src=”cat_picture.gif” />
<video><source src=" cat_video.mp4"
type="video/mp4"></video>
CSS
body {
background-color: red;
};
JavaScript
confirm(“Are you ready
for some cat vids?”);
// OK or Cancel
JSON / XML
{“presenters”: [{“id”:
1, “name”: “Vesa”},
{“id”: 2, “name”:
“Timo”}]}
Ruby
Rails
MongoDB Hadoop
Backbone Bacon.js
Frontend Bentobox
The Browser (=frontend)
The Frontend Bentobox: tasks
The Server (=backend)
(i.e. “not frontend” stuff)
Behavior
Style
Content for browsers Content for servers / backend
Display a picture of a kitteh
Make the background red
Confirm that the
user actually
wants to delete a
file
Transfer World Bank
statistics needed to
determine relationship
of GDP and birth rate
Perform serious data crunching on which
kitteh should be shown to which user
Frontend Bentobox Exercise:
acronyms & tasks
Rules: Figure out the term and place it on the
bentobox in the right place. There might be
false friends and doubles. Googling allowed!
● HTML
● JavaScript
● PHP
● EcmaScript
● CSS
● Java
● jQuery
● Angular
● JSON
● Ember
● XML
● Rails
● Make the font size bigger
● Have a chat app show new
messages without having to refresh
the page
● Show an ordered list of items
(e.g. todo list)
Acronyms Tasks
Live demo:
HTML & CSS on Codecademy.com
Let’s look at the first exercise, “HTML Basics”:
http://www.codecademy.com/en/tracks/web
Extra credit exercise: earn a badge!
● Option 1: CodeSchool.com video course https://www.
codeschool.com/courses/front-end-foundations
(requires a free signup, the part about HTML is free)
● Option 2: Codecademy.com text-based course http:
//www.codecademy.com/en/tracks/web
(requires a free signup, the whole course is free)
● For extra credit:
○ Post a link to your badge(s) here (see appendix for instructions):
https://docs.google.com/a/efekta.fi/forms/d/1DlXmnyicUvmvprjipXTyBdALoymksF1b9irtv5TDLPc/viewform
Appendix
Extra Credit Instructions: How to find the
URLs to badges
http://www.codecademy.com/users/username/achievements
CodeCademy.comCodeSchool.com
https://www.codeschool.com/users/12345
HTML primer: principles
● HTML documents are a set of nested “tags” which
declare the structure of a document
○ e.g. <p>This is a paragraph of text</p>
● Most tags have a starting tag (<[tag]>) and an
ending tag (</[tag]>)
● Tags can be nested inside each other, e.g.
HTML “hello world”, or a very simple
example – open up a text editor*, save to
index.html and open with a web browser
<body>
<h1>Hello Rails Girls!</h1>
<h2>Menu</h2>
<ul>
<li><a href=”about.html”>About</a></li>
</ul>
<p>If you paste this into a text file and save it as index.
html, it should work if you open it in your browser.</p>
</body>
* text editor is a (desktop) application that edits plain text files, for example HTML, CSS, JavaScript
and Ruby. Examples of free text editors are: https://atom.io/ http://www.sublimetext.com/ or http:
//brackets.io/
HTML primer: basic tags
<html> </html> HTML tags declare the file is an HTML document. Everything else is nested inside
these tags.
<h1> </h1>
<h2> </h2>
Heading tags (H1, H2, H3, H4, ..) are meant for declaring different levels (H1 is more
important than H2) of headings
<ul> <li></li> </ul>
<ol> <li></li> </ol>
UL (unordered list) and OL (ordered list) declare lists of list items, LI, which are
essentially bullet points and numbered lists
<p> </p> Paragraph of text. Each new paragraph automatically leaves a little space between the
previous.
<a href=”http://google.com”>Google</a> Anchor tags can be used to make links to other pages, files, images, etc. Note that the
A tag has a “href” attribute, which is used to tell that the anchor tag points to some
other file than itself.
<img src=”logo.png”>
<img src=”http://example.com/logo.png”>
The IMG tag is used for embedding image files into the page, and the “src” attribute is
used to tell which file should be embedded. The example uses a “relative file path” on
the local server, which means that the file should be found in the same folder as the
HTML file with the filename of logo.png. You can also link to pictures on other sites
using a path starting with “http://”, which is known as “hotlinking” and considered bad
practice. Note that the IMG tag does not have a separate end tag.
HTML primer: index.html
<html>
<head>
<title>Google</title>
<link rel="stylesheet" type="text/css" href="/style/style.css">
</head>
<body>
<h1>Main heading</h1>
<ul>
<li>Home</li>
<li>About</li>
</ul>
<p>Paragraph text</p>
</body>
</html>
Declares the document as HTML
Header: helps the browser prime the page before showing any content
Link to CSS file in the header
Closing tag for header and start tag for page
body, which is shown to user
H1 heading tag for the main heading
UL tag for an unordered list and LI tags for
individual list items
P tag for paragraph text
Closing tags for body (visible part of the page) and html tag (which explicitly
tells the browser where the document ends)
Frontend Bentobox
The Browser (=frontend)
The Frontend Bentobox
The Server (=backend)
(i.e. “not frontend” stuff)
Behavior
Style
Content for browsers Content for servers / backend
Photo credits (Creative Commons)
● Gold iPhone 6: http://pl.wikipedia.org/wiki/IPhone#mediaviewer/File:IPhone_6_Gold_Side.png
● Dell rack server: http://it.wikipedia.org/wiki/Rack_(informatica)#mediaviewer/File:Servers_at_LAAS_(FDLS_2007)_0392c.jpg
● Samsung Smart Tv: https://www.flickr.com/photos/samsungtomorrow/7505176858/
● Google Logo: http://commons.wikimedia.org/wiki/File:Googlelogo.png

More Related Content

What's hot (20)

HTML 5 Overview
HTML 5 OverviewHTML 5 Overview
HTML 5 Overview
Offir Ariel
 
HTML5 and XHTML2
HTML5 and XHTML2HTML5 and XHTML2
HTML5 and XHTML2
Michael(tm) Smith
 
Ultimate Skills Checklist for Your First Front-End Developer Job
Ultimate Skills Checklist for Your First Front-End Developer JobUltimate Skills Checklist for Your First Front-End Developer Job
Ultimate Skills Checklist for Your First Front-End Developer Job
Brenna Van Norman
 
The Future of the Web: HTML5
The Future of the Web: HTML5The Future of the Web: HTML5
The Future of the Web: HTML5
Derek Bender
 
Web architecture - overview of techniques.
Web architecture - overview of  techniques.Web architecture - overview of  techniques.
Web architecture - overview of techniques.
Ruslan Shevchenko
 
HTML5 and Search Engine Optimization (SEO)
HTML5 and Search Engine Optimization (SEO)HTML5 and Search Engine Optimization (SEO)
HTML5 and Search Engine Optimization (SEO)
Performics.Convonix
 
Introdution to HTML 5
Introdution to HTML 5Introdution to HTML 5
Introdution to HTML 5
onkar_bhosle
 
Internet programming notes
Internet programming notesInternet programming notes
Internet programming notes
Durgadevi palani
 
Web development
Web developmentWeb development
Web development
KAZEMBETVOnline
 
HTML literals, the JSX of the platform
HTML literals, the JSX of the platformHTML literals, the JSX of the platform
HTML literals, the JSX of the platform
Kenneth Rohde Christiansen
 
Basics of css and xhtml
Basics of css and xhtmlBasics of css and xhtml
Basics of css and xhtml
sagaroceanic11
 
HTML5
HTML5HTML5
HTML5
Hatem Mahmoud
 
Introduction to HTML5/CSS3 In Drupal 7
Introduction to HTML5/CSS3 In Drupal 7Introduction to HTML5/CSS3 In Drupal 7
Introduction to HTML5/CSS3 In Drupal 7
Mediacurrent
 
HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)
Mediacurrent
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
Ron Reiter
 
Grade 10 COMPUTER
Grade 10 COMPUTERGrade 10 COMPUTER
Grade 10 COMPUTER
Joel Linquico
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
Webcomponents TLV October 2014
Webcomponents TLV October 2014Webcomponents TLV October 2014
Webcomponents TLV October 2014
Dmitry Bakaleinik
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Sean Burgess
 
HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examples
Alfredo Torre
 
Ultimate Skills Checklist for Your First Front-End Developer Job
Ultimate Skills Checklist for Your First Front-End Developer JobUltimate Skills Checklist for Your First Front-End Developer Job
Ultimate Skills Checklist for Your First Front-End Developer Job
Brenna Van Norman
 
The Future of the Web: HTML5
The Future of the Web: HTML5The Future of the Web: HTML5
The Future of the Web: HTML5
Derek Bender
 
Web architecture - overview of techniques.
Web architecture - overview of  techniques.Web architecture - overview of  techniques.
Web architecture - overview of techniques.
Ruslan Shevchenko
 
HTML5 and Search Engine Optimization (SEO)
HTML5 and Search Engine Optimization (SEO)HTML5 and Search Engine Optimization (SEO)
HTML5 and Search Engine Optimization (SEO)
Performics.Convonix
 
Introdution to HTML 5
Introdution to HTML 5Introdution to HTML 5
Introdution to HTML 5
onkar_bhosle
 
Internet programming notes
Internet programming notesInternet programming notes
Internet programming notes
Durgadevi palani
 
Basics of css and xhtml
Basics of css and xhtmlBasics of css and xhtml
Basics of css and xhtml
sagaroceanic11
 
Introduction to HTML5/CSS3 In Drupal 7
Introduction to HTML5/CSS3 In Drupal 7Introduction to HTML5/CSS3 In Drupal 7
Introduction to HTML5/CSS3 In Drupal 7
Mediacurrent
 
HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)HTML5 & CSS3 in Drupal (on the Bayou)
HTML5 & CSS3 in Drupal (on the Bayou)
Mediacurrent
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
Ron Reiter
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
Webcomponents TLV October 2014
Webcomponents TLV October 2014Webcomponents TLV October 2014
Webcomponents TLV October 2014
Dmitry Bakaleinik
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Sean Burgess
 
HTML5: features with examples
HTML5: features with examplesHTML5: features with examples
HTML5: features with examples
Alfredo Torre
 

Viewers also liked (8)

Ajax and JavaScript mit Ruby on Rails
Ajax and JavaScript mit Ruby on RailsAjax and JavaScript mit Ruby on Rails
Ajax and JavaScript mit Ruby on Rails
Jonathan Weiss
 
HTML 5 & CSS 3
HTML 5 & CSS 3HTML 5 & CSS 3
HTML 5 & CSS 3
Kevin van Dijk
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshell
Lennart Schoors
 
Web application architecture
Web application architectureWeb application architecture
Web application architecture
Tejaswini Deshpande
 
Architecture of a Modern Web App
Architecture of a Modern Web AppArchitecture of a Modern Web App
Architecture of a Modern Web App
scothis
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 
Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentation
elliehood
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
photomatt
 
Ajax and JavaScript mit Ruby on Rails
Ajax and JavaScript mit Ruby on RailsAjax and JavaScript mit Ruby on Rails
Ajax and JavaScript mit Ruby on Rails
Jonathan Weiss
 
Html 5 in a big nutshell
Html 5 in a big nutshellHtml 5 in a big nutshell
Html 5 in a big nutshell
Lennart Schoors
 
Architecture of a Modern Web App
Architecture of a Modern Web AppArchitecture of a Modern Web App
Architecture of a Modern Web App
scothis
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 
Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentation
elliehood
 
State of the Word 2011
State of the Word 2011State of the Word 2011
State of the Word 2011
photomatt
 

Similar to Rails Girls - Introduction to HTML & CSS (20)

Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
zonathen
 
Front End Lecture 1.pptx
Front End Lecture 1.pptxFront End Lecture 1.pptx
Front End Lecture 1.pptx
malise2997
 
Iwt module 1
Iwt  module 1Iwt  module 1
Iwt module 1
SANTOSH RATH
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
Paxcel Technologies
 
The Factors For The Website
The Factors For The WebsiteThe Factors For The Website
The Factors For The Website
Julie May
 
Decoding the Web
Decoding the WebDecoding the Web
Decoding the Web
newcircle
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
vikasmittal92
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5
Ravi Raj
 
Day1
Day1Day1
Day1
Avanish Sanchi
 
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith
 
Wa html5-pdf
Wa html5-pdfWa html5-pdf
Wa html5-pdf
Olivier Eeckhoutte
 
Wa html5-pdf
Wa html5-pdfWa html5-pdf
Wa html5-pdf
rcobos_fireworks
 
Full Stack Development Course in Gurgaon
Full Stack Development Course in GurgaonFull Stack Development Course in Gurgaon
Full Stack Development Course in Gurgaon
digitallynikitasharm
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
Sachin Walvekar
 
HTML5 introduction for beginners
HTML5 introduction for beginnersHTML5 introduction for beginners
HTML5 introduction for beginners
Vineeth N Krishnan
 
Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websites
websiteunlimited
 
Web Programming introduction
Web Programming introductionWeb Programming introduction
Web Programming introduction
Abdul-Rahman Mahmood
 
Vskills angular js sample material
Vskills angular js sample materialVskills angular js sample material
Vskills angular js sample material
Vskills
 
Web Engineering UNIT III as per RGPV Syllabus
Web Engineering UNIT III as per RGPV SyllabusWeb Engineering UNIT III as per RGPV Syllabus
Web Engineering UNIT III as per RGPV Syllabus
NANDINI SHARMA
 
Frontend Interview Questions PDF By ScholarHat
Frontend Interview Questions PDF By ScholarHatFrontend Interview Questions PDF By ScholarHat
Frontend Interview Questions PDF By ScholarHat
Scholarhat
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
zonathen
 
Front End Lecture 1.pptx
Front End Lecture 1.pptxFront End Lecture 1.pptx
Front End Lecture 1.pptx
malise2997
 
Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1Html5 deciphered - designing concepts part 1
Html5 deciphered - designing concepts part 1
Paxcel Technologies
 
The Factors For The Website
The Factors For The WebsiteThe Factors For The Website
The Factors For The Website
Julie May
 
Decoding the Web
Decoding the WebDecoding the Web
Decoding the Web
newcircle
 
Is it time to start using HTML 5
Is it time to start using HTML 5Is it time to start using HTML 5
Is it time to start using HTML 5
Ravi Raj
 
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith: HTML5 at Web Directions South 2008
Michael(tm) Smith
 
Full Stack Development Course in Gurgaon
Full Stack Development Course in GurgaonFull Stack Development Course in Gurgaon
Full Stack Development Course in Gurgaon
digitallynikitasharm
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
Sachin Walvekar
 
HTML5 introduction for beginners
HTML5 introduction for beginnersHTML5 introduction for beginners
HTML5 introduction for beginners
Vineeth N Krishnan
 
Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websites
websiteunlimited
 
Vskills angular js sample material
Vskills angular js sample materialVskills angular js sample material
Vskills angular js sample material
Vskills
 
Web Engineering UNIT III as per RGPV Syllabus
Web Engineering UNIT III as per RGPV SyllabusWeb Engineering UNIT III as per RGPV Syllabus
Web Engineering UNIT III as per RGPV Syllabus
NANDINI SHARMA
 
Frontend Interview Questions PDF By ScholarHat
Frontend Interview Questions PDF By ScholarHatFrontend Interview Questions PDF By ScholarHat
Frontend Interview Questions PDF By ScholarHat
Scholarhat
 

Recently uploaded (20)

Introducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRCIntroducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRC
Adtran
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
Introducing FME Realize: A New Era of Spatial Computing and AR
Introducing FME Realize: A New Era of Spatial Computing and ARIntroducing FME Realize: A New Era of Spatial Computing and AR
Introducing FME Realize: A New Era of Spatial Computing and AR
Safe Software
 
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Nikki Chapple
 
Agentic AI - The New Era of Intelligence
Agentic AI - The New Era of IntelligenceAgentic AI - The New Era of Intelligence
Agentic AI - The New Era of Intelligence
Muzammil Shah
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
James Anderson
 
SDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhereSDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhere
Adtran
 
Grannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI ExperiencesGrannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI Experiences
Lauren Parr
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Talk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya WeersTalk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya Weers
Kaya Weers
 
Measuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI SuccessMeasuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI Success
Nikki Chapple
 
Building Agents with LangGraph & Gemini
Building Agents with LangGraph &  GeminiBuilding Agents with LangGraph &  Gemini
Building Agents with LangGraph & Gemini
HusseinMalikMammadli
 
Microsoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentationMicrosoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentation
Digitalmara
 
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPathCommunity
 
Splunk Leadership Forum Wien - 20.05.2025
Splunk Leadership Forum Wien - 20.05.2025Splunk Leadership Forum Wien - 20.05.2025
Splunk Leadership Forum Wien - 20.05.2025
Splunk
 
Let’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack CommunityLet’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack Community
SanjeetMishra29
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptxECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
Jasper Oosterveld
 
Introducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRCIntroducing the OSA 3200 SP and OSA 3250 ePRC
Introducing the OSA 3200 SP and OSA 3250 ePRC
Adtran
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
Introducing FME Realize: A New Era of Spatial Computing and AR
Introducing FME Realize: A New Era of Spatial Computing and ARIntroducing FME Realize: A New Era of Spatial Computing and AR
Introducing FME Realize: A New Era of Spatial Computing and AR
Safe Software
 
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Nikki Chapple
 
Agentic AI - The New Era of Intelligence
Agentic AI - The New Era of IntelligenceAgentic AI - The New Era of Intelligence
Agentic AI - The New Era of Intelligence
Muzammil Shah
 
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure ModesCognitive Chasms - A Typology of GenAI Failure Failure Modes
Cognitive Chasms - A Typology of GenAI Failure Failure Modes
Dr. Tathagat Varma
 
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
GDG Cloud Southlake #43: Tommy Todd: The Quantum Apocalypse: A Looming Threat...
James Anderson
 
SDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhereSDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhere
Adtran
 
Grannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI ExperiencesGrannie’s Journey to Using Healthcare AI Experiences
Grannie’s Journey to Using Healthcare AI Experiences
Lauren Parr
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
Talk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya WeersTalk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya Weers
Kaya Weers
 
Measuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI SuccessMeasuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI Success
Nikki Chapple
 
Building Agents with LangGraph & Gemini
Building Agents with LangGraph &  GeminiBuilding Agents with LangGraph &  Gemini
Building Agents with LangGraph & Gemini
HusseinMalikMammadli
 
Microsoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentationMicrosoft Build 2025 takeaways in one presentation
Microsoft Build 2025 takeaways in one presentation
Digitalmara
 
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPathCommunity
 
Splunk Leadership Forum Wien - 20.05.2025
Splunk Leadership Forum Wien - 20.05.2025Splunk Leadership Forum Wien - 20.05.2025
Splunk Leadership Forum Wien - 20.05.2025
Splunk
 
Let’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack CommunityLet’s Get Slack Certified! 🚀- Slack Community
Let’s Get Slack Certified! 🚀- Slack Community
SanjeetMishra29
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptxECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
ECS25 - The adventures of a Microsoft 365 Platform Owner - Website.pptx
Jasper Oosterveld
 

Rails Girls - Introduction to HTML & CSS

  • 1. A Rails Girls Introduction to HTML & CSS Rails Girls Helsinki, Finland, Spring 2015 Timo Herttua & Vesa Vänskä
  • 2. Agenda 1. Why HTML & CSS are crucial in life? 2. Why HTML & CSS are crucial in RG? 3. Bonus: Why to learn them already today and not tomorrow 4. Division of Labor on the Internet 5. The Front-end Bentobox 6. Live demo: Codeacademy 7. Extra credit exercise 8. Appendix: instructions, HTML primer, Frontend Bentobox
  • 3. Why HTML & CSS ● Perhaps the single most important, and easiest to grasp entry point to the world of web tech ○ WYSIVCTWYG or “What you see is very close to what you get” ● Many of today’s professional developers started with making websites ● The other entry point you typically hear is computer graphics (CG) and/or games (i.e. the Finnish Demoscene*) – which are much more difficult to make than websites ● The third, and perhaps hardest entry point, is tinkering with hardware (e.g. Commodore, Amiga, Arduino, Raspberry Pi, drones, robots, etc.), because of so many moving parts and “low level” programming languages involved *Wikipedia article about the Demoscene: http://en.wikipedia.org/wiki/Demoscene; A Finnish TV series about the Demoscene: http://areena.yle. fi/tv/demoscene; Grand Cru’s account of the Demoscene: http://grandcrugames.com/2013/03/what-the-hll-is-in-the-water-of-finland/
  • 4. HTML & CSS in the Internet ● Close to everything you see on the internet is a combination of HTML, CSS & JavaScript ● Even some apps on iOS & Andoid are made with them (e.g. Facebook’s first gen mobile) ● Web browser is the universal app that everyone has ● HTML, CSS & JS are the language of the web, and the web browsers ● HTML, CSS & JS are open source standards, meaning that no plugins are required to run them
  • 5. Role of HTML & CSS in Rails Girls ● Rails Girls is an introduction to (web application) technology ● Rails in Rails Girls refers to “Ruby on Rails”, a popular web application programming framework (Rails) built with the Ruby programming language ● Web applications are pieces of software that dynamically generate HTML pages that make further use of CSS and JavaScript to make them more visually pleasing and interactive
  • 6. Today: HTML; tomorrow: (among other things) dynamic generation of HTML ● Web applications are used to transmit and transform information by dynamically generating HTML based on user inputs (e.g. Facebook’s chat) ● In order to understand web applications, you need to understand HTML ● In order to make web applications pretty, you need CSS ● In order to make web applications more interactive / responsive, you need JavaScript
  • 7. A bonus “why” ● By engaging with HTML & CSS today, you’ll increase your chances of getting access to a personal coach for a 3-6 month period to help you enter the world of web tech in great company! ● Details on how exactly, stay tuned for more info later in the presentation
  • 8. What is a website made of? ● An HTML page is ○ a structured text file with hyperlinks ■ to other HTML pages ■ to assets, such as ● embedded files, that the browser can display, such as ○ images ○ videos ○ audio ● CSS stylesheets ● script files (JavaScript) ● downloadable files such as PDF’s,
  • 9. A website, “visually” <html> <head> <title>Google</title> <link rel="stylesheet" type="text/css" href=" /style/style.css"> </head> <body> <div id="logo" style="/images/logo.png"></div> <input id="keywords"> <button id="search">Google Search</button> <button id="lucky">I'm Feeling Lucky</button> </body> </html> HTML: http://www.google.com/index.html or just http://google.com body { background-color: white; } button { background-color: light grey; } Stylesheet: style.css Google logo: logo.png
  • 10. Connected devices such as smart TV’s Clients and servers Server (a.k.a backend a.k.a. the cloud) Desktop web browser Mobile device web browser & embedded browsers in “hybrid apps” Client (a.k.a frontend) examples: The cloud (=many servers someone else like Amazon or Google owns, priced per usage per month, not per physical server) Structured data (HTML, JSON, XML, …)
  • 11. HTTP request - response cycle Browser Server 1. Request to http://google.com 2. Server decides what it wants to respond Web page 3. The response tells the browser what to show in the browser 4. The browser renders the page
  • 12. Division of labor on the Internet For browsers: HTML <h1>This is a heading</h1> <p>This is a paragraph</p> <img src=”cat_picture.gif” /> <video><source src=" cat_video.mp4" type="video/mp4"></video> For JS / servers: JSON / XML {“presenters”: [{“id”: 1, “name”: “Vesa”}, {“id”: 2, “name”: “Timo”}]} Structured content CSS body { background-color: red; }; JavaScript confirm(“Are you ready for some cat vids?”); // OK or Cancel Adobe Flash Microsoft Silverlight ... The Browser (=frontend) (e.g. Chrome, Firefox, Safari, ..) Style & behavior Rails, CakePHP, Django, Spring Ruby, PHP, Python, Java Frameworks (=productivity tools by programmers for programmers) Languages (=ways to instruct machines) The Server (=backend) (proprietary) Browser plugins
  • 13. What was all that Confucianism? The Rails Girls workshop uses the Bentobox model to make the world of tech more approachable by helping you attach meaning to the many acronyms of tech (HTML, JS, CSS, etc.) Read more: http://blog.railsgirls.com/post/20405930015/bentobox-learn-the-language-of-technology
  • 14. Using the Bentobox today Frontend Bentobox Backend (tomorrow’s subject)
  • 15. Frontend Bentobox The Browser (=frontend) The Frontend Bentobox The Server (=backend) (i.e. “not frontend” stuff) Behavior Style Content for browsers Content for servers / backend
  • 16. Frontend Bentobox The Browser (=frontend) The Frontend Bentobox: acronyms The Server (=backend) (i.e. “not frontend” stuff) Behavior Style Content for browsers Content for servers / backend HTML <h1>This is a heading</h1> <p>This is a paragraph</p> <img src=”cat_picture.gif” /> <video><source src=" cat_video.mp4" type="video/mp4"></video> CSS body { background-color: red; }; JavaScript confirm(“Are you ready for some cat vids?”); // OK or Cancel JSON / XML {“presenters”: [{“id”: 1, “name”: “Vesa”}, {“id”: 2, “name”: “Timo”}]} Ruby Rails MongoDB Hadoop Backbone Bacon.js
  • 17. Frontend Bentobox The Browser (=frontend) The Frontend Bentobox: tasks The Server (=backend) (i.e. “not frontend” stuff) Behavior Style Content for browsers Content for servers / backend Display a picture of a kitteh Make the background red Confirm that the user actually wants to delete a file Transfer World Bank statistics needed to determine relationship of GDP and birth rate Perform serious data crunching on which kitteh should be shown to which user
  • 18. Frontend Bentobox Exercise: acronyms & tasks Rules: Figure out the term and place it on the bentobox in the right place. There might be false friends and doubles. Googling allowed! ● HTML ● JavaScript ● PHP ● EcmaScript ● CSS ● Java ● jQuery ● Angular ● JSON ● Ember ● XML ● Rails ● Make the font size bigger ● Have a chat app show new messages without having to refresh the page ● Show an ordered list of items (e.g. todo list) Acronyms Tasks
  • 19. Live demo: HTML & CSS on Codecademy.com Let’s look at the first exercise, “HTML Basics”: http://www.codecademy.com/en/tracks/web
  • 20. Extra credit exercise: earn a badge! ● Option 1: CodeSchool.com video course https://www. codeschool.com/courses/front-end-foundations (requires a free signup, the part about HTML is free) ● Option 2: Codecademy.com text-based course http: //www.codecademy.com/en/tracks/web (requires a free signup, the whole course is free) ● For extra credit: ○ Post a link to your badge(s) here (see appendix for instructions): https://docs.google.com/a/efekta.fi/forms/d/1DlXmnyicUvmvprjipXTyBdALoymksF1b9irtv5TDLPc/viewform
  • 22. Extra Credit Instructions: How to find the URLs to badges http://www.codecademy.com/users/username/achievements CodeCademy.comCodeSchool.com https://www.codeschool.com/users/12345
  • 23. HTML primer: principles ● HTML documents are a set of nested “tags” which declare the structure of a document ○ e.g. <p>This is a paragraph of text</p> ● Most tags have a starting tag (<[tag]>) and an ending tag (</[tag]>) ● Tags can be nested inside each other, e.g.
  • 24. HTML “hello world”, or a very simple example – open up a text editor*, save to index.html and open with a web browser <body> <h1>Hello Rails Girls!</h1> <h2>Menu</h2> <ul> <li><a href=”about.html”>About</a></li> </ul> <p>If you paste this into a text file and save it as index. html, it should work if you open it in your browser.</p> </body> * text editor is a (desktop) application that edits plain text files, for example HTML, CSS, JavaScript and Ruby. Examples of free text editors are: https://atom.io/ http://www.sublimetext.com/ or http: //brackets.io/
  • 25. HTML primer: basic tags <html> </html> HTML tags declare the file is an HTML document. Everything else is nested inside these tags. <h1> </h1> <h2> </h2> Heading tags (H1, H2, H3, H4, ..) are meant for declaring different levels (H1 is more important than H2) of headings <ul> <li></li> </ul> <ol> <li></li> </ol> UL (unordered list) and OL (ordered list) declare lists of list items, LI, which are essentially bullet points and numbered lists <p> </p> Paragraph of text. Each new paragraph automatically leaves a little space between the previous. <a href=”http://google.com”>Google</a> Anchor tags can be used to make links to other pages, files, images, etc. Note that the A tag has a “href” attribute, which is used to tell that the anchor tag points to some other file than itself. <img src=”logo.png”> <img src=”http://example.com/logo.png”> The IMG tag is used for embedding image files into the page, and the “src” attribute is used to tell which file should be embedded. The example uses a “relative file path” on the local server, which means that the file should be found in the same folder as the HTML file with the filename of logo.png. You can also link to pictures on other sites using a path starting with “http://”, which is known as “hotlinking” and considered bad practice. Note that the IMG tag does not have a separate end tag.
  • 26. HTML primer: index.html <html> <head> <title>Google</title> <link rel="stylesheet" type="text/css" href="/style/style.css"> </head> <body> <h1>Main heading</h1> <ul> <li>Home</li> <li>About</li> </ul> <p>Paragraph text</p> </body> </html> Declares the document as HTML Header: helps the browser prime the page before showing any content Link to CSS file in the header Closing tag for header and start tag for page body, which is shown to user H1 heading tag for the main heading UL tag for an unordered list and LI tags for individual list items P tag for paragraph text Closing tags for body (visible part of the page) and html tag (which explicitly tells the browser where the document ends)
  • 27. Frontend Bentobox The Browser (=frontend) The Frontend Bentobox The Server (=backend) (i.e. “not frontend” stuff) Behavior Style Content for browsers Content for servers / backend
  • 28. Photo credits (Creative Commons) ● Gold iPhone 6: http://pl.wikipedia.org/wiki/IPhone#mediaviewer/File:IPhone_6_Gold_Side.png ● Dell rack server: http://it.wikipedia.org/wiki/Rack_(informatica)#mediaviewer/File:Servers_at_LAAS_(FDLS_2007)_0392c.jpg ● Samsung Smart Tv: https://www.flickr.com/photos/samsungtomorrow/7505176858/ ● Google Logo: http://commons.wikimedia.org/wiki/File:Googlelogo.png