SlideShare ist ein Scribd-Unternehmen logo
1 von 42
HTML & CSS
James Mills - @jamesmills
Searchcamp - Saturday 8th June 2013
EXCITED TO BE HERE!
Ohhhhh yer!
@jamesmills (Geoff)
Teesside University - HND IT / BSc IT
Applaud Web Solutions
Koodoo Creative
Thap
James Mills Live - IFTTT
My Shopping Assistant – Tesco API
PHP North East – NE User group
Refresh Teesside – Founder
Refresh teesside is a free event for
people in the creative industry
around teesside
what
We meet on the second Thursday of
every month between 6pm & 9pm at
sassari’s in middlesbrough
when
bring together the best
and brightest creatives in
the North East to share knowledge, promote
talent and encourage collaboration.
goal
What we are going to do today
Build a simple personal homepage
• Your name
• Image gallery
• Short introduction
• List of places visited
• List of hobbies
• Contact links (Twitter, LinkedIn, Facebook)
Questions
Please interrupt with questions
How the web works
• Every connected device has an IP address
• Each web server has a dedicated IP address
• This IP address is like a postal address
• You link a domain name to an IP address
• Subdomains and mail for a domain can point to different
IP addresses (different servers/services)
• When you set the DNS of a domain your telling the
computer where to look for your website/service
• Takes a while to propagate
Text Editors and IDE‟s
• Text Editors
• Notepad
• TextMate
• Sublime (We will use this)
• Integrated Development Environment (IDE‟s)
• Designed to maximize programmer productivity
• IDEs are dedicated to a specific programming language
• Examples (PHP Storm, Visual Studio)
Project structure
• Try and keep all projects in one folder
• Stick to a naming convention that your comfortable with
• Only keep web files in your web project folder
• Underscores not spaces
Different file types
• index.html
• index.php
• index.aspx
• HTML pages are static files - No dynamic content, server
side code or anything loaded from Database. Can be
loaded in browser with no server.
• PHP & ASPX pages have server side code in them which
require a server to run them which returns HTML to the
browser.
Hypertext Markup Language
We will look at:
• html / header / body / div
• h1, h2, p, a, table, ul, li, img
HTML – 1
Create a new page index.html
<!DOCTYPE html>
<head>
<title>My Page Title</title>
</head>
<body>
<!-- page content goes here -->
</body>
</html>
HTML - 2
h1, h2, h3 – Page headings
p – Paragraph
table - Tabular data
ul, ol, li – Unordered & ordered lists. List items.
a – Hyperlinks (used to link from one page to another)
HTML - 3
<!DOCTYPE html>
<head>
<title>James Mills Online</title>
</head>
<body>
<h1>James Mills</h1>
</body>
</html>
HTML - 4
<h2>Background<h2>
<h2>Image Gallery</h2>
<h2>Places visited</h2>
<h2>Hobbies</h2>
<h2>Links</h2>
<h3>Professional</h3>
<h3>Social</h3>
HTML - 5
<h2>Background<h2>
<p>
I am a web develop. I work at Thap.
</p>
<p>
You can force a new line within a paragraph.<br />
By adding a line brake in it.
</p>
HTML – 6
<h2>Image Gallery</h2>
<p>
I have created a gallery on a separate page for
images. Click the button below to view the gallery.
<p>
<a href=“gallery.html” title=“James Mills Image Gallery”>
Image Gallery</a>
HTML - 7
<h2>Places visited</h2>
<table>
<tr>
<td>Dubai</td>
</tr>
<tr>
<td>Australia</td>
</tr>
<tr>
<td>Malta</td>
</tr>
</table>
HTML - 8
<h2>Hobbies</h2>
<ol>
<li>Photography</li>
<li>Running</li>
</ol>
HTML - 9
<h2>Links</h2>
<h3>Professional</h3>
<ul>
<li><a href=“http://bbc.co.uk‟>BBC</a></li>
</<ul>
<h3>Social</h3>
<ul>
<li><a href=“http://twitter.com‟>Twitter</a></li>
</<ul>
HTML - 10
Create a new file called gallery.html
Enter the following in preparation for the gallery
1. Html tags with doctype
2. Head
3. Title
4. Body
5. Your own heading, intro and anything else
HTML – 11
<!DOCTYPE html>
<head>
<title>Gallery</title>
</head>
<body>
<h1>My Photo Gallery<h1>
<p>Introduction to my gallery</p>
<a href=“index.html”>Go Back</a>
</body>
</html>
HTML – 12
• Find a couple of images to go in your gallery.
• Create thumbnails (200x200px) - www.picresize.com
• Put all images together
• /img/thumbs/
• /img/large/
HTML -13
<ul>
<li>
<a href=”img/large/image_one.jpg”>
<img src=”img/thumb/image_one.jpg”>
</a>
</li>
<li>
<a href=”/img/large/image_two.jpg”>
<img src=”/img/thumb/image_two.jpg”>
</a>
</li>
</ul>
Let‟s look at what we have
We now have a html site!
1. Open browser
2. Open file in folder
3. Drag html file into browser
Cascading Style Sheets
Let‟s now look at adding some styles.
Not just styles. CSS is also used for layout.
Will explain the „Cascading‟ part later on.
• Colors
• Font
• Background color
• Size
• Border
• Positioning
• Margin, Padding
CSS - 1
Inline Styles
<h1 style="color:red; border:1px solid #000; text-
transform:capitalize; padding:8px; background-
color:yellow;">testing</h1>
• Dirty, but they work!
• Messy codebase
• Harder to manage
• Cannot share the style across elements
CSS – 2
Classes, ID‟s & In-page styles to the rescue!
<head>
<style type="text/css”>
/* styles go here */
</styles>
</head>
.class_name – use classes for CSS – can have many
#id_name – use ID‟s for Javascript – must be unique
CSS - 3
<style type="text/css">
.title {
color:red;
border:1px solid #000;
text-transform:capitalize;
padding:8px;
background-color:yellow;
}
</style>
<h1 class="title">testing</h1>
<h2 class="title">another title</h2>
<a href="#" class="title”>click me</a>
CSS - 4
One class applied to many elements
Block level elements
Default styles
CSS - 5
Better example – gallery items
Let‟s move our styles to a separate file
<link href=”styles.css" rel="stylesheet" media="screen">
And reorganise our files into assets/…
CSS – 6
<ul class="thumbnails">
<li>
<a href="#" class="thumbnail">
<img src="assets/img/gallery/thumbs/one.jpg”>
</a>
</li>
CSS - 7
ul.thumbnails {
list-style: none;
}
ul.thumbnails li a.thumbnail {
float: left;
margin-right: 8px;
border: 4px solid #999;
background-color: #ccc;
padding: 12px;
}
CSS – 8
Now we have one main CSS file
Replace in-page styles for new CSS file in index.html
Let‟s style some more content
CSS – 9
Let‟s look at layouts
<div class=“container”>
<div class="row">
<div class=”col">...</div>
<div class=”col">...</div>
</div><!-- /.row 
</div><!-- /.container -->
CSS - 10
CSS Selectors
• :nth-child(2)
• :last-child
Check browser support
• http://caniuse.com
• http://www.browsersupport.net
Browser debug/build
CSS Frameworks
Pure - http://purecss.io
Twitter Boostrap - http://twitter.github.io/bootstrap
960 Grid System - http://960.gs
Blueprint - http://www.blueprintcss.org
Foundation - http://foundation.zurb.com
Twitter Bootstrap
Let‟s freestyle some Bootstrap into our site
I am going to get shot for using this if anyone finds out!
…however the idea is to introduce frameworks because:
• Many people contributing
• Well tested
• Multiple browser support
• Fast – good for prototyping
• And much more…

Weitere ähnliche Inhalte

Was ist angesagt?

Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSNYCSS Meetup
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSTJ Stalcup
 
Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersMelvin John
 
Front End Web Development Basics
Front End Web Development BasicsFront End Web Development Basics
Front End Web Development BasicsTahir Shahzad
 
Word press bootcamp By Sourcescript Innovations and Mentors Dojo
Word press bootcamp  By Sourcescript Innovations and Mentors DojoWord press bootcamp  By Sourcescript Innovations and Mentors Dojo
Word press bootcamp By Sourcescript Innovations and Mentors Dojolightshire
 
Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)Thinkful
 
Intro To Twitter Bootstrap
Intro To Twitter BootstrapIntro To Twitter Bootstrap
Intro To Twitter BootstrapAhmed Haque
 
WordPress Themes Demystified
WordPress Themes DemystifiedWordPress Themes Demystified
WordPress Themes DemystifiedChris Burgess
 
מצגת לחניכים שיעור מתוקשב
מצגת לחניכים שיעור מתוקשבמצגת לחניכים שיעור מתוקשב
מצגת לחניכים שיעור מתוקשבShirly Kamusher
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlantaThinkful
 
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. FoundationBattle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. FoundationRachel Cherry
 
Twitter bootstrap training_session_ppt
Twitter bootstrap training_session_pptTwitter bootstrap training_session_ppt
Twitter bootstrap training_session_pptRadheshyam Kori
 

Was ist angesagt? (20)

Web1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSSWeb1O1 - Intro to HTML/CSS
Web1O1 - Intro to HTML/CSS
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSS
 
CSS Best practice
CSS Best practiceCSS Best practice
CSS Best practice
 
Lecture 2 - HTML Basics
Lecture 2 - HTML BasicsLecture 2 - HTML Basics
Lecture 2 - HTML Basics
 
Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for Developers
 
Front End Web Development Basics
Front End Web Development BasicsFront End Web Development Basics
Front End Web Development Basics
 
Word press bootcamp By Sourcescript Innovations and Mentors Dojo
Word press bootcamp  By Sourcescript Innovations and Mentors DojoWord press bootcamp  By Sourcescript Innovations and Mentors Dojo
Word press bootcamp By Sourcescript Innovations and Mentors Dojo
 
Efficient theming in Drupal
Efficient theming in DrupalEfficient theming in Drupal
Efficient theming in Drupal
 
Html for beginners
Html for beginnersHtml for beginners
Html for beginners
 
Html:css crash course (4:5)
Html:css crash course (4:5)Html:css crash course (4:5)
Html:css crash course (4:5)
 
Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
 
Intro To Twitter Bootstrap
Intro To Twitter BootstrapIntro To Twitter Bootstrap
Intro To Twitter Bootstrap
 
Web development basics
Web development basicsWeb development basics
Web development basics
 
Html lesson1 5
Html lesson1 5Html lesson1 5
Html lesson1 5
 
WordPress Themes Demystified
WordPress Themes DemystifiedWordPress Themes Demystified
WordPress Themes Demystified
 
מצגת לחניכים שיעור מתוקשב
מצגת לחניכים שיעור מתוקשבמצגת לחניכים שיעור מתוקשב
מצגת לחניכים שיעור מתוקשב
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlanta
 
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. FoundationBattle of the Front-End Frameworks: Bootstrap vs. Foundation
Battle of the Front-End Frameworks: Bootstrap vs. Foundation
 
Twitter bootstrap training_session_ppt
Twitter bootstrap training_session_pptTwitter bootstrap training_session_ppt
Twitter bootstrap training_session_ppt
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 

Andere mochten auch

11-D International: An Introduction
11-D International: An Introduction11-D International: An Introduction
11-D International: An IntroductionVaes3n
 
Personal Projects
Personal ProjectsPersonal Projects
Personal ProjectsJames Mills
 
Preferred source
Preferred sourcePreferred source
Preferred sourceCamelotPCC
 
155678818 percubaan-2013-penang-matematik-k1
155678818 percubaan-2013-penang-matematik-k1155678818 percubaan-2013-penang-matematik-k1
155678818 percubaan-2013-penang-matematik-k1S Rusdi Ibrahim
 
Oracle bones
Oracle bonesOracle bones
Oracle bonesmrpavlou
 
Parenting seminar for couples for christ 03.04
Parenting seminar for couples for christ 03.04Parenting seminar for couples for christ 03.04
Parenting seminar for couples for christ 03.04cora_bernardo_1950
 

Andere mochten auch (6)

11-D International: An Introduction
11-D International: An Introduction11-D International: An Introduction
11-D International: An Introduction
 
Personal Projects
Personal ProjectsPersonal Projects
Personal Projects
 
Preferred source
Preferred sourcePreferred source
Preferred source
 
155678818 percubaan-2013-penang-matematik-k1
155678818 percubaan-2013-penang-matematik-k1155678818 percubaan-2013-penang-matematik-k1
155678818 percubaan-2013-penang-matematik-k1
 
Oracle bones
Oracle bonesOracle bones
Oracle bones
 
Parenting seminar for couples for christ 03.04
Parenting seminar for couples for christ 03.04Parenting seminar for couples for christ 03.04
Parenting seminar for couples for christ 03.04
 

Ähnlich wie HTML/CSS Workshop @ Searchcamp

LIS3353 SP12 Week 4
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4Amanda Case
 
Ifi7174 lesson1
Ifi7174 lesson1Ifi7174 lesson1
Ifi7174 lesson1Sónia
 
Take Your Markup to 11
Take Your Markup to 11Take Your Markup to 11
Take Your Markup to 11Emily Lewis
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practiceshoctudau
 
[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSS[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSSBeckhamWee
 
Lesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayLesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayCodecademy Ren
 
Css week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourCss week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourOsama Ghandour Geris
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentationalledia
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5Terry Ryan
 
Developing Your Ultimate Package
Developing Your Ultimate PackageDeveloping Your Ultimate Package
Developing Your Ultimate PackageSimon Collison
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucksTim Wright
 
Fronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateFronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateInventis Web Architects
 
Web Development Using CSS3
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3Anjan Mahanta
 
Web Development Using CSS3
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3Anjan Mahanta
 
Creating HTML Pages
Creating HTML PagesCreating HTML Pages
Creating HTML PagesMike Crabb
 

Ähnlich wie HTML/CSS Workshop @ Searchcamp (20)

LIS3353 SP12 Week 4
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4
 
Dhtml chapter2
Dhtml chapter2Dhtml chapter2
Dhtml chapter2
 
Ifi7174 lesson1
Ifi7174 lesson1Ifi7174 lesson1
Ifi7174 lesson1
 
Take Your Markup to 11
Take Your Markup to 11Take Your Markup to 11
Take Your Markup to 11
 
HTML CSS Best Practices
HTML CSS Best PracticesHTML CSS Best Practices
HTML CSS Best Practices
 
[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSS[SUTD GDSC] Intro to HTML and CSS
[SUTD GDSC] Intro to HTML and CSS
 
Lesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayLesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ay
 
Html
HtmlHtml
Html
 
Css
CssCss
Css
 
Css week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourCss week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandour
 
Joomla Beginner Template Presentation
Joomla Beginner Template PresentationJoomla Beginner Template Presentation
Joomla Beginner Template Presentation
 
HTML & CSS 2017
HTML & CSS 2017HTML & CSS 2017
HTML & CSS 2017
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 
Developing Your Ultimate Package
Developing Your Ultimate PackageDeveloping Your Ultimate Package
Developing Your Ultimate Package
 
Slow kinda sucks
Slow kinda sucksSlow kinda sucks
Slow kinda sucks
 
The web context
The web contextThe web context
The web context
 
Fronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-templateFronttechnieken met HTML5 en de Slice-template
Fronttechnieken met HTML5 en de Slice-template
 
Web Development Using CSS3
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3
 
Web Development Using CSS3
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3
 
Creating HTML Pages
Creating HTML PagesCreating HTML Pages
Creating HTML Pages
 

Kürzlich hochgeladen

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Kürzlich hochgeladen (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

HTML/CSS Workshop @ Searchcamp

  • 1. HTML & CSS James Mills - @jamesmills Searchcamp - Saturday 8th June 2013
  • 2. EXCITED TO BE HERE! Ohhhhh yer!
  • 3. @jamesmills (Geoff) Teesside University - HND IT / BSc IT Applaud Web Solutions Koodoo Creative Thap James Mills Live - IFTTT My Shopping Assistant – Tesco API PHP North East – NE User group Refresh Teesside – Founder
  • 4. Refresh teesside is a free event for people in the creative industry around teesside what
  • 5. We meet on the second Thursday of every month between 6pm & 9pm at sassari’s in middlesbrough when
  • 6. bring together the best and brightest creatives in the North East to share knowledge, promote talent and encourage collaboration. goal
  • 7. What we are going to do today Build a simple personal homepage • Your name • Image gallery • Short introduction • List of places visited • List of hobbies • Contact links (Twitter, LinkedIn, Facebook)
  • 9. How the web works • Every connected device has an IP address • Each web server has a dedicated IP address • This IP address is like a postal address • You link a domain name to an IP address • Subdomains and mail for a domain can point to different IP addresses (different servers/services) • When you set the DNS of a domain your telling the computer where to look for your website/service • Takes a while to propagate
  • 10.
  • 11. Text Editors and IDE‟s • Text Editors • Notepad • TextMate • Sublime (We will use this) • Integrated Development Environment (IDE‟s) • Designed to maximize programmer productivity • IDEs are dedicated to a specific programming language • Examples (PHP Storm, Visual Studio)
  • 12. Project structure • Try and keep all projects in one folder • Stick to a naming convention that your comfortable with • Only keep web files in your web project folder • Underscores not spaces
  • 13. Different file types • index.html • index.php • index.aspx • HTML pages are static files - No dynamic content, server side code or anything loaded from Database. Can be loaded in browser with no server. • PHP & ASPX pages have server side code in them which require a server to run them which returns HTML to the browser.
  • 14. Hypertext Markup Language We will look at: • html / header / body / div • h1, h2, p, a, table, ul, li, img
  • 15. HTML – 1 Create a new page index.html <!DOCTYPE html> <head> <title>My Page Title</title> </head> <body> <!-- page content goes here --> </body> </html>
  • 16. HTML - 2 h1, h2, h3 – Page headings p – Paragraph table - Tabular data ul, ol, li – Unordered & ordered lists. List items. a – Hyperlinks (used to link from one page to another)
  • 17. HTML - 3 <!DOCTYPE html> <head> <title>James Mills Online</title> </head> <body> <h1>James Mills</h1> </body> </html>
  • 18. HTML - 4 <h2>Background<h2> <h2>Image Gallery</h2> <h2>Places visited</h2> <h2>Hobbies</h2> <h2>Links</h2> <h3>Professional</h3> <h3>Social</h3>
  • 19. HTML - 5 <h2>Background<h2> <p> I am a web develop. I work at Thap. </p> <p> You can force a new line within a paragraph.<br /> By adding a line brake in it. </p>
  • 20. HTML – 6 <h2>Image Gallery</h2> <p> I have created a gallery on a separate page for images. Click the button below to view the gallery. <p> <a href=“gallery.html” title=“James Mills Image Gallery”> Image Gallery</a>
  • 21. HTML - 7 <h2>Places visited</h2> <table> <tr> <td>Dubai</td> </tr> <tr> <td>Australia</td> </tr> <tr> <td>Malta</td> </tr> </table>
  • 23. HTML - 9 <h2>Links</h2> <h3>Professional</h3> <ul> <li><a href=“http://bbc.co.uk‟>BBC</a></li> </<ul> <h3>Social</h3> <ul> <li><a href=“http://twitter.com‟>Twitter</a></li> </<ul>
  • 24. HTML - 10 Create a new file called gallery.html Enter the following in preparation for the gallery 1. Html tags with doctype 2. Head 3. Title 4. Body 5. Your own heading, intro and anything else
  • 25. HTML – 11 <!DOCTYPE html> <head> <title>Gallery</title> </head> <body> <h1>My Photo Gallery<h1> <p>Introduction to my gallery</p> <a href=“index.html”>Go Back</a> </body> </html>
  • 26. HTML – 12 • Find a couple of images to go in your gallery. • Create thumbnails (200x200px) - www.picresize.com • Put all images together • /img/thumbs/ • /img/large/
  • 27. HTML -13 <ul> <li> <a href=”img/large/image_one.jpg”> <img src=”img/thumb/image_one.jpg”> </a> </li> <li> <a href=”/img/large/image_two.jpg”> <img src=”/img/thumb/image_two.jpg”> </a> </li> </ul>
  • 28. Let‟s look at what we have We now have a html site! 1. Open browser 2. Open file in folder 3. Drag html file into browser
  • 29. Cascading Style Sheets Let‟s now look at adding some styles. Not just styles. CSS is also used for layout. Will explain the „Cascading‟ part later on. • Colors • Font • Background color • Size • Border • Positioning • Margin, Padding
  • 30. CSS - 1 Inline Styles <h1 style="color:red; border:1px solid #000; text- transform:capitalize; padding:8px; background- color:yellow;">testing</h1> • Dirty, but they work! • Messy codebase • Harder to manage • Cannot share the style across elements
  • 31. CSS – 2 Classes, ID‟s & In-page styles to the rescue! <head> <style type="text/css”> /* styles go here */ </styles> </head> .class_name – use classes for CSS – can have many #id_name – use ID‟s for Javascript – must be unique
  • 32. CSS - 3 <style type="text/css"> .title { color:red; border:1px solid #000; text-transform:capitalize; padding:8px; background-color:yellow; } </style> <h1 class="title">testing</h1> <h2 class="title">another title</h2> <a href="#" class="title”>click me</a>
  • 33. CSS - 4 One class applied to many elements Block level elements Default styles
  • 34. CSS - 5 Better example – gallery items Let‟s move our styles to a separate file <link href=”styles.css" rel="stylesheet" media="screen"> And reorganise our files into assets/…
  • 35. CSS – 6 <ul class="thumbnails"> <li> <a href="#" class="thumbnail"> <img src="assets/img/gallery/thumbs/one.jpg”> </a> </li>
  • 36. CSS - 7 ul.thumbnails { list-style: none; } ul.thumbnails li a.thumbnail { float: left; margin-right: 8px; border: 4px solid #999; background-color: #ccc; padding: 12px; }
  • 37. CSS – 8 Now we have one main CSS file Replace in-page styles for new CSS file in index.html Let‟s style some more content
  • 38. CSS – 9 Let‟s look at layouts <div class=“container”> <div class="row"> <div class=”col">...</div> <div class=”col">...</div> </div><!-- /.row  </div><!-- /.container -->
  • 39. CSS - 10 CSS Selectors • :nth-child(2) • :last-child Check browser support • http://caniuse.com • http://www.browsersupport.net
  • 41. CSS Frameworks Pure - http://purecss.io Twitter Boostrap - http://twitter.github.io/bootstrap 960 Grid System - http://960.gs Blueprint - http://www.blueprintcss.org Foundation - http://foundation.zurb.com
  • 42. Twitter Bootstrap Let‟s freestyle some Bootstrap into our site I am going to get shot for using this if anyone finds out! …however the idea is to introduce frameworks because: • Many people contributing • Well tested • Multiple browser support • Fast – good for prototyping • And much more…

Hinweis der Redaktion

  1. Sorry… I am not a designer!
  2. &lt;title&gt; is not the page title like a H1 its used in the browser and in SEOImportant. Unique.
  3. &lt;tr&gt;&lt;th&gt;
  4. &lt;p&gt;I have split links into two categories&lt;/p&gt;
  5. assets/img/gallery/thumbs/assets/img/gallery/large/Other images….
  6. Lets look at :last-child