SlideShare a Scribd company logo
Intro to HTML & CSS
Joash Tan
@bakkwatan
Build your first website!
Download the source code
before we begin to save time
https://tinyurl.com/26myhj9c
• Self learnt HTML, CSS, JS (TS) & React
(Native)
• Data Analyst
• ESD
• Dislike bakkwa, high calories
• and backend
About me
22 years old
Download the source code
https://tinyurl.com/26myhj9c
Content
1 hour
HTML
Introduction to HTML
HTML styling
HTML Tags
Introduction to CSS
CSS styles
Q & A
CSS
10 minutes
Introduction
0 minutes
Break
15 minutes
What is HTML?
• HyperText Markup Language
• Wix, squarespace, Shopify…
• More customization and understand how
website works
• <Tags/>
• Editors: Atom, VSCode, Notepad++, Notepad…
<!--Type of doc is html-->
<!DOCTYPE html>
<!--overall container-->
<html>
<!--settings, properties of html-->
<head>
<!--change tab name-->
<title>I am learning HTML!</title>
</head>
<!--content of html-->
<body>
Hello world
</body>
</html>
INDEX.HTML
<!--
Do not comment nonsense
-->
<!--Do not comment nonsense-->
<!--<TAG></TAG>-->
<head>
<!--common type of character set-->
<meta charset="UTF-8"/>
<!--description of my website (description for google search and SEO)-->
<meta name="description" content="My Awesome Website"/>
<!--ensure that your website is responsive-->
<meta name=“viewport" content=“width=device-width, initial-scale=1.0"/>
<!--change tab name-->
<title>I am learning HTML!</title>
</head>
https://www.w3schools.com/tags/tag_meta.asp
<meta/>
<!--content of html-->
<body>
<!--header tags (default settings applied, styling comes later in css)-->
<h1>My website</h1>
<h2>Subheader for my website</h2>
<h6>Subsubheader for my website</h6>
</body>
<h1>Enter Title here</h1>
<body>
<h1>My website</h1>
<!--paragraph tags (default settings applied, styling comes later in css)-->
<p>This is my paragraph</p>
<h2>Subheader for my website</h2>
<!--b for bold, i for italic-->
<p>This is my <i>paragraph</i> for my subheader</p>
<p>This is my <b><i>paragraph</i></b> paragraph for my subheader</p>
</body>
<p>Enter <b>paragraph</b> here</p>
<p>This is my paragraph</p>
<h1>My website</h1>
<h2>Subheader for my website</h2>
<p>This is my <i>paragraph</i> for my subheader</p>
<p>This is my <b><i>paragraph</i></b> paragraph for my
subheader</p>
<h1>My website</h1>
<p>This is my paragraph</p>
<h2>Subheader for my website</h2>
<p>This is my <i>paragraph</i> for my subheader</p>
<p>This is my <b><i>paragraph</i></b> paragraph for my
subheader</p>
<h1>My website</h1>
<!--subscript-->
<p>H<sub>2</sub>O</p>
<!--superscript-->
<p>x<sup>2</sup></p>
<p>I love O<sub>2</sub></p>
<!--colour me timbres-->
<h1 style="background-color: yellow; color: green;">My website</h1>
<p style="color: blue;">H<sub>2</sub>O</p>
<p style="color: #777777;">x<sup>2</sup></p>
https://www.w3schools.com/cssref/css_colors.php
https://www.w3schools.com/html/html_colors.asp
<p style=“type: cool;”>Sunglasses</p>
<!--I add navigation bar, logos, etc. here-->
<header>
<!--I add navigation links here-->
<nav>
</nav>
</header>
<!--I add all content here-->
<main>
<!--I can add an article here (for blogs)-->
<article>
<!--I add sections of my article here-->
<section>
h1
h2
h2
h3
</section>
</article>
</main>
<!--I add additional links, links to my socials, etc. here-->
<footer>
</footer>
<body>structure of html</body>
<!--
Tip: You do not have to
structure your contents based
on articles and section but its
generally good practice and it
helps search engine
optimization as google can scan
through your html file and
understand what your website is
about. THEY ARE IMPORTANT.
Ignore all the haters that say
they are not.
-->
<!--a tag in p tag to link me to youtube!-->
<p>Hey you! click this <a href="https://www.youtube.com/"
target="_blank">link</a> to watch my youtube video!</p>
<p>Hey you! click <a href="static/page_2.html">this</a> to go to 2nd page</p>
<a href=“#”>Link me!</a>
<img src="assets/cat.jpg" alt="an angry cat with low resolution"/>
<img src="https://icatcare.org/app/uploads/2018/07/Thinking-of-
getting-a-cat.png" alt="A cute cat with high resolution"/>
<img src=“source” alt=“important”/>
<!--
Tip: please write alts just in
case your image suddenly goes
missing.
-->
<video src="assets/video.mkv" controls width="800"
poster="assets/cat.jpg"></video>
https://www.w3schools.com/html/html5_video.asp
<video src=“source” controls></video>
<!--
Tip: Add text between the tags
just in case the video is
missing. If you want to use a
youtube video, you can do an
iframe instead.
-->
<ol type="I"> <!--1,a,A,i-->
make me a sandwich
<li>2 slices of bread bread</li>
<li>hams
<ul>
<li>1 turkey</li>
<li>1 chicken</li>
</ul>
</li>
<li>1 cheese</li>
<li>mayonnaise</li>
</ol>
<list>grocery list</list>
<!--example of block-->
<div style="border: 1px solid black;">
this is a div
</div>
<!--example of inline-->
<span style="border: 1px solid blue;">
this is a span
</span>
<div>Contents of my tupperware</div>
<!--
Example of block elements: <p>
Example of inline elements: <a>
-->
<form>
<!--input types: date, email, range, file, checkbox, radio (need a
name), submit-->
<input type="text" value="example username" placeholder="enter your
username"/>
<input type="password" placeholder="enter your password"/>
<textarea rows="10" cols="50">
Enter your paragraph
</textarea>
</form>
<input/>
Have a good break.
Cause I need one too.
- Joash Tan
What is CSS?
• Cascading StyleSheet
• Sibling of HTML
• Classes and id
• Different styles (color, backgroundColor, etc.)
<body style="color: green; font-size: 30px;">
<header>
<h1 style="color: blue; text-decoration: underline;">CSS TUTORIAL</h1>
</header>
<main>
<p style="border: 1px solid black; width: 100px;">Let us style this
paragraph!</p>
</main>
</body>
.styling{} .border{}
<body style="color: green;">
<header>
<h1>CSS TUTORIAL</h1>
</header>
<main>
<p>Let us style this paragraph!</p>
</main>
</body>
https://www.w3schools.com/colors/colors_picker.asp
.color{} (NOT colour!)
<!--
Can replace “green” with other
default colors, #, rgb or hsl.
-->
<main>
<p style="border: 1px solid black; margin-top: 50px; padding-
bottom: 30px;">Let us style this paragraph!</p>
</main>
.margins{} .paddings{}
<ul style="float: left; background-color: aqua; padding: 20px;">
<li>home</li>
<li>about</li>
<li>contact</li>
</ul>
<main>
<p>Floats are helpful in positioning images/navigation lists etc.</p>
</main>
.floats{}
<ul style="background-color: aqua; padding: 20px;">
<li style="display: inline;">home</li>
<li style="display: inline;">about</li>
<li style="display: inline;">contact</li>
<li style="display: none;">blog</li>
</ul>
<main>
<p>Display is helpful in manipulating html elements</p>
</main>
.display{}
<div style="position: relative; top: 20px; left: 30px;
width: 100px; height: 100px; background-color: blue">
</div>
<div style="width: 150px;height: 150px; background-color:
red;">
</div>
.position{}
<!--
Position: Static(default),
Relative, Absolute, Fixed
-->
<h1 style="text-shadow: 2px 2px 2px green; position: relative;
top: 120px;">a cat</h1>
<img style="box-shadow: 5px 5px 5px blue; opacity: 0.4; border-
radius: 50%;" src="assets/cat.jpg" alt="a cat"/>
.shadow{} .border-radius{}
<p style="font-family: 'Courier', Times, serif; font-size: 1em; font-weight:
bold; font-style: italic;">
This is my main paragraph. I am going to try and write as long of a paragraph
because I want to show different attributes and how you can style this
paragraph. This is important because it is important because it is important
because it is important because it is important because it is important.
</p>
.fonts{}
<head>
<style>
body {
color: blue;
}
h1 {
color: red;
}
</style>
</head>
<body>
<h1>This is a h1</h1>
<h3>This is a h3</h3>
<p>This is a paragraph.</p>
</body>
.styletag{}
<!--
Style tags, inline styling and
external StyleSheets are ways
we can apply CSS to html. Each
has its pros and cons.
-->
<head>
<link rel="stylesheet“ href="./style.css" />
</head>
<body>
<h1>This is a h1</h1>
<h3>This is a h3</h3>
<p>This is a paragraph.</p>
</body>
.stylesheet{}
/*Create a new stylesheet, it can be named anything as long as it ends in .css*/
<!--html->
<div class="container">
<h1 id="first_container_h1">This is a h1</h1>
<h3>This is a h3</h3>
<p>This is a paragraph.</p>
</div>
<div class="container make_green">
<h1 id="second_container_h2">This is a h1</h1>
<h3>This is a h3</h3>
<p>This is a paragraph.</p>
</div>
.class{} #id{}
/* css */
.container {
text-align: center;
}
#first_container_h1 {
color: blue;
background-color: yellow;
}
/* this line makes my container turn green */
.make_green {
color: green;
}
/* Can have multiple classes but only 1 id. Generally, use id
to pick out that 1-3 specific element. It’s not important if
you look only in terms of CSS but when it comes to inclusion
of other languages like JS, this is an important rule of
thumb as id is used for identification. */
<!--html->
<div class="container">
<h1 id="first_container_h1">This is a h1</h1>
<h3>This is a h3</h3>
<p>This is a paragraph.</p>
</div>
<div class="container2 make_green">
<h1 id="second_container_h2">This is a h1</h1>
<h3>This is a h3</h3>
<p>This is a paragraph.</p>
</div>
.classSelectors{}
/* css */
* {
background-color: aqua;
}
.container, .container2 {
text-align: center;
}
#first_container_h1 {
color: blue;
background-color: yellow;
}
.make_green {
color: black;
border: 1px solid white;
}
/* this line makes my container turn green when I hover over
the element */
.make_green:hover {
color: green;
border: 1px solid black;
}
<!--html->
<div class="flex_container">
<div class="container">
<h1>1</h1>
</div>
<div class="container">
<h1>2</h1>
</div>
<div class="container">
<h1>3</h1>
</div>
<div class="container">
<h1>4</h1>
</div>
<div class="container">
<h1>5</h1>
</div>
</div>
.flexbox{}
/* css */
.flex_container {
background-color: burlywood;
height: 100vh;
display: flex;
flex-direction: row;
justify-content: center; /*horizontal centering*/
align-items: center; /*vertically centering*/
}
.container {
width: 100px;
height: 100px;
margin: 10px;
background-color: pink;
border: 3px solid black;
}
Additional info
<!--learning materials-->
https://codepen.io/
https://www.w3schools.com/html/default.asp
https://www.w3schools.com/css/default.asp
/*Reach out to me*/
joash_tan@mymail.sutd.edu.sg
www.linkedin.com/in/bakkwatan
Thank you!

More Related Content

Similar to [SUTD GDSC] Intro to HTML and CSS (20)

Web 102 INtro to CSS
Web 102  INtro to CSSWeb 102  INtro to CSS
Web 102 INtro to CSS
Hawkman Academy
 
css-note.pptx
css-note.pptxcss-note.pptx
css-note.pptx
Samay16
 
Css starting
Css startingCss starting
Css starting
Rahul Dihora
 
CSS – CASCADING STYLE SHEET - MY_PPT.pptx
CSS – CASCADING STYLE SHEET - MY_PPT.pptxCSS – CASCADING STYLE SHEET - MY_PPT.pptx
CSS – CASCADING STYLE SHEET - MY_PPT.pptx
IorlahaSamuel1
 
Css for Development
Css for DevelopmentCss for Development
Css for Development
tsengsite
 
Intro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 SlidesIntro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 Slides
Heather Rock
 
Workshop 2 Slides.pptx
Workshop 2 Slides.pptxWorkshop 2 Slides.pptx
Workshop 2 Slides.pptx
DaniyalSardar
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
VARSHAKUMARI49
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPoint
Sahil Gandhi
 
Html n css tutorial
Html n css tutorialHtml n css tutorial
Html n css tutorial
zubeditufail
 
Html 2
Html   2Html   2
Html 2
pavishkumarsingh
 
HTML and CSS
HTML and CSSHTML and CSS
HTML and CSS
Ketan Ghumatkar
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSS
Syed Sami
 
CSS
CSSCSS
CSS
Raja Kumar Ranjan
 
Web - CSS 1.pptx
Web - CSS 1.pptxWeb - CSS 1.pptx
Web - CSS 1.pptx
haroon451422
 
css front end development , designing web page
css front end development , designing web pagecss front end development , designing web page
css front end development , designing web page
Indu32
 
CSS presentation for beginners where they can understand easily
CSS presentation for beginners where they can understand easilyCSS presentation for beginners where they can understand easily
CSS presentation for beginners where they can understand easily
Indu32
 
Html5 elements-Kip Academy
Html5 elements-Kip AcademyHtml5 elements-Kip Academy
Html5 elements-Kip Academy
kip academy
 
Css, CaseCading Style Sheet
Css, CaseCading Style SheetCss, CaseCading Style Sheet
Css, CaseCading Style Sheet
Ishaq Shinwari
 
4_css_intro.pptx. this ppt is based on css which is the required of web deve...
4_css_intro.pptx.  this ppt is based on css which is the required of web deve...4_css_intro.pptx.  this ppt is based on css which is the required of web deve...
4_css_intro.pptx. this ppt is based on css which is the required of web deve...
sindwanigripsi
 
css-note.pptx
css-note.pptxcss-note.pptx
css-note.pptx
Samay16
 
CSS – CASCADING STYLE SHEET - MY_PPT.pptx
CSS – CASCADING STYLE SHEET - MY_PPT.pptxCSS – CASCADING STYLE SHEET - MY_PPT.pptx
CSS – CASCADING STYLE SHEET - MY_PPT.pptx
IorlahaSamuel1
 
Css for Development
Css for DevelopmentCss for Development
Css for Development
tsengsite
 
Intro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 SlidesIntro to HTML and CSS - Class 2 Slides
Intro to HTML and CSS - Class 2 Slides
Heather Rock
 
Workshop 2 Slides.pptx
Workshop 2 Slides.pptxWorkshop 2 Slides.pptx
Workshop 2 Slides.pptx
DaniyalSardar
 
Basics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPointBasics of Front End Web Dev PowerPoint
Basics of Front End Web Dev PowerPoint
Sahil Gandhi
 
Html n css tutorial
Html n css tutorialHtml n css tutorial
Html n css tutorial
zubeditufail
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSS
Syed Sami
 
css front end development , designing web page
css front end development , designing web pagecss front end development , designing web page
css front end development , designing web page
Indu32
 
CSS presentation for beginners where they can understand easily
CSS presentation for beginners where they can understand easilyCSS presentation for beginners where they can understand easily
CSS presentation for beginners where they can understand easily
Indu32
 
Html5 elements-Kip Academy
Html5 elements-Kip AcademyHtml5 elements-Kip Academy
Html5 elements-Kip Academy
kip academy
 
Css, CaseCading Style Sheet
Css, CaseCading Style SheetCss, CaseCading Style Sheet
Css, CaseCading Style Sheet
Ishaq Shinwari
 
4_css_intro.pptx. this ppt is based on css which is the required of web deve...
4_css_intro.pptx.  this ppt is based on css which is the required of web deve...4_css_intro.pptx.  this ppt is based on css which is the required of web deve...
4_css_intro.pptx. this ppt is based on css which is the required of web deve...
sindwanigripsi
 

Recently uploaded (20)

Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
Introducing Ensemble Cloudlet vRouter
Introducing Ensemble  Cloudlet vRouterIntroducing Ensemble  Cloudlet vRouter
Introducing Ensemble Cloudlet vRouter
Adtran
 
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
 
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
 
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
 
cloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mitacloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mita
siyaldhande02
 
TrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy ContractingTrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy Contracting
TrustArc
 
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Lorenzo Miniero
 
The 2025 Digital Adoption Blueprint.pptx
The 2025 Digital Adoption Blueprint.pptxThe 2025 Digital Adoption Blueprint.pptx
The 2025 Digital Adoption Blueprint.pptx
aptyai
 
Evaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical ContentEvaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical Content
Paul Groth
 
Gihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai TechnologyGihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai Technology
zainkhurram1111
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
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
 
SDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhereSDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhere
Adtran
 
European Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility TestingEuropean Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility Testing
Julia Undeutsch
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
Building Agents with LangGraph & Gemini
Building Agents with LangGraph &  GeminiBuilding Agents with LangGraph &  Gemini
Building Agents with LangGraph & Gemini
HusseinMalikMammadli
 
Security Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk CertificateSecurity Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk Certificate
VICTOR MAESTRE RAMIREZ
 
AI Trends - Mary Meeker
AI Trends - Mary MeekerAI Trends - Mary Meeker
AI Trends - Mary Meeker
Razin Mustafiz
 
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
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
Introducing Ensemble Cloudlet vRouter
Introducing Ensemble  Cloudlet vRouterIntroducing Ensemble  Cloudlet vRouter
Introducing Ensemble Cloudlet vRouter
Adtran
 
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
 
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
 
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
 
cloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mitacloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mita
siyaldhande02
 
TrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy ContractingTrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy Contracting
TrustArc
 
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Lorenzo Miniero
 
The 2025 Digital Adoption Blueprint.pptx
The 2025 Digital Adoption Blueprint.pptxThe 2025 Digital Adoption Blueprint.pptx
The 2025 Digital Adoption Blueprint.pptx
aptyai
 
Evaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical ContentEvaluation Challenges in Using Generative AI for Science & Technical Content
Evaluation Challenges in Using Generative AI for Science & Technical Content
Paul Groth
 
Gihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai TechnologyGihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai Technology
zainkhurram1111
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
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
 
SDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhereSDG 9000 Series: Unleashing multigigabit everywhere
SDG 9000 Series: Unleashing multigigabit everywhere
Adtran
 
European Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility TestingEuropean Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility Testing
Julia Undeutsch
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
Building Agents with LangGraph & Gemini
Building Agents with LangGraph &  GeminiBuilding Agents with LangGraph &  Gemini
Building Agents with LangGraph & Gemini
HusseinMalikMammadli
 
Security Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk CertificateSecurity Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk Certificate
VICTOR MAESTRE RAMIREZ
 
AI Trends - Mary Meeker
AI Trends - Mary MeekerAI Trends - Mary Meeker
AI Trends - Mary Meeker
Razin Mustafiz
 
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
 

[SUTD GDSC] Intro to HTML and CSS

  • 1. Intro to HTML & CSS Joash Tan @bakkwatan Build your first website! Download the source code before we begin to save time https://tinyurl.com/26myhj9c
  • 2. • Self learnt HTML, CSS, JS (TS) & React (Native) • Data Analyst • ESD • Dislike bakkwa, high calories • and backend About me 22 years old
  • 3. Download the source code https://tinyurl.com/26myhj9c
  • 4. Content 1 hour HTML Introduction to HTML HTML styling HTML Tags Introduction to CSS CSS styles Q & A CSS 10 minutes Introduction 0 minutes Break 15 minutes
  • 5. What is HTML? • HyperText Markup Language • Wix, squarespace, Shopify… • More customization and understand how website works • <Tags/> • Editors: Atom, VSCode, Notepad++, Notepad…
  • 6. <!--Type of doc is html--> <!DOCTYPE html> <!--overall container--> <html> <!--settings, properties of html--> <head> <!--change tab name--> <title>I am learning HTML!</title> </head> <!--content of html--> <body> Hello world </body> </html> INDEX.HTML <!-- Do not comment nonsense --> <!--Do not comment nonsense--> <!--<TAG></TAG>-->
  • 7. <head> <!--common type of character set--> <meta charset="UTF-8"/> <!--description of my website (description for google search and SEO)--> <meta name="description" content="My Awesome Website"/> <!--ensure that your website is responsive--> <meta name=“viewport" content=“width=device-width, initial-scale=1.0"/> <!--change tab name--> <title>I am learning HTML!</title> </head> https://www.w3schools.com/tags/tag_meta.asp <meta/>
  • 8. <!--content of html--> <body> <!--header tags (default settings applied, styling comes later in css)--> <h1>My website</h1> <h2>Subheader for my website</h2> <h6>Subsubheader for my website</h6> </body> <h1>Enter Title here</h1>
  • 9. <body> <h1>My website</h1> <!--paragraph tags (default settings applied, styling comes later in css)--> <p>This is my paragraph</p> <h2>Subheader for my website</h2> <!--b for bold, i for italic--> <p>This is my <i>paragraph</i> for my subheader</p> <p>This is my <b><i>paragraph</i></b> paragraph for my subheader</p> </body> <p>Enter <b>paragraph</b> here</p>
  • 10. <p>This is my paragraph</p> <h1>My website</h1> <h2>Subheader for my website</h2> <p>This is my <i>paragraph</i> for my subheader</p> <p>This is my <b><i>paragraph</i></b> paragraph for my subheader</p> <h1>My website</h1> <p>This is my paragraph</p> <h2>Subheader for my website</h2> <p>This is my <i>paragraph</i> for my subheader</p> <p>This is my <b><i>paragraph</i></b> paragraph for my subheader</p>
  • 12. <!--colour me timbres--> <h1 style="background-color: yellow; color: green;">My website</h1> <p style="color: blue;">H<sub>2</sub>O</p> <p style="color: #777777;">x<sup>2</sup></p> https://www.w3schools.com/cssref/css_colors.php https://www.w3schools.com/html/html_colors.asp <p style=“type: cool;”>Sunglasses</p>
  • 13. <!--I add navigation bar, logos, etc. here--> <header> <!--I add navigation links here--> <nav> </nav> </header> <!--I add all content here--> <main> <!--I can add an article here (for blogs)--> <article> <!--I add sections of my article here--> <section> h1 h2 h2 h3 </section> </article> </main> <!--I add additional links, links to my socials, etc. here--> <footer> </footer> <body>structure of html</body> <!-- Tip: You do not have to structure your contents based on articles and section but its generally good practice and it helps search engine optimization as google can scan through your html file and understand what your website is about. THEY ARE IMPORTANT. Ignore all the haters that say they are not. -->
  • 14. <!--a tag in p tag to link me to youtube!--> <p>Hey you! click this <a href="https://www.youtube.com/" target="_blank">link</a> to watch my youtube video!</p> <p>Hey you! click <a href="static/page_2.html">this</a> to go to 2nd page</p> <a href=“#”>Link me!</a>
  • 15. <img src="assets/cat.jpg" alt="an angry cat with low resolution"/> <img src="https://icatcare.org/app/uploads/2018/07/Thinking-of- getting-a-cat.png" alt="A cute cat with high resolution"/> <img src=“source” alt=“important”/> <!-- Tip: please write alts just in case your image suddenly goes missing. -->
  • 16. <video src="assets/video.mkv" controls width="800" poster="assets/cat.jpg"></video> https://www.w3schools.com/html/html5_video.asp <video src=“source” controls></video> <!-- Tip: Add text between the tags just in case the video is missing. If you want to use a youtube video, you can do an iframe instead. -->
  • 17. <ol type="I"> <!--1,a,A,i--> make me a sandwich <li>2 slices of bread bread</li> <li>hams <ul> <li>1 turkey</li> <li>1 chicken</li> </ul> </li> <li>1 cheese</li> <li>mayonnaise</li> </ol> <list>grocery list</list>
  • 18. <!--example of block--> <div style="border: 1px solid black;"> this is a div </div> <!--example of inline--> <span style="border: 1px solid blue;"> this is a span </span> <div>Contents of my tupperware</div> <!-- Example of block elements: <p> Example of inline elements: <a> -->
  • 19. <form> <!--input types: date, email, range, file, checkbox, radio (need a name), submit--> <input type="text" value="example username" placeholder="enter your username"/> <input type="password" placeholder="enter your password"/> <textarea rows="10" cols="50"> Enter your paragraph </textarea> </form> <input/>
  • 20. Have a good break. Cause I need one too. - Joash Tan
  • 21. What is CSS? • Cascading StyleSheet • Sibling of HTML • Classes and id • Different styles (color, backgroundColor, etc.)
  • 22. <body style="color: green; font-size: 30px;"> <header> <h1 style="color: blue; text-decoration: underline;">CSS TUTORIAL</h1> </header> <main> <p style="border: 1px solid black; width: 100px;">Let us style this paragraph!</p> </main> </body> .styling{} .border{}
  • 23. <body style="color: green;"> <header> <h1>CSS TUTORIAL</h1> </header> <main> <p>Let us style this paragraph!</p> </main> </body> https://www.w3schools.com/colors/colors_picker.asp .color{} (NOT colour!) <!-- Can replace “green” with other default colors, #, rgb or hsl. -->
  • 24. <main> <p style="border: 1px solid black; margin-top: 50px; padding- bottom: 30px;">Let us style this paragraph!</p> </main> .margins{} .paddings{}
  • 25. <ul style="float: left; background-color: aqua; padding: 20px;"> <li>home</li> <li>about</li> <li>contact</li> </ul> <main> <p>Floats are helpful in positioning images/navigation lists etc.</p> </main> .floats{}
  • 26. <ul style="background-color: aqua; padding: 20px;"> <li style="display: inline;">home</li> <li style="display: inline;">about</li> <li style="display: inline;">contact</li> <li style="display: none;">blog</li> </ul> <main> <p>Display is helpful in manipulating html elements</p> </main> .display{}
  • 27. <div style="position: relative; top: 20px; left: 30px; width: 100px; height: 100px; background-color: blue"> </div> <div style="width: 150px;height: 150px; background-color: red;"> </div> .position{} <!-- Position: Static(default), Relative, Absolute, Fixed -->
  • 28. <h1 style="text-shadow: 2px 2px 2px green; position: relative; top: 120px;">a cat</h1> <img style="box-shadow: 5px 5px 5px blue; opacity: 0.4; border- radius: 50%;" src="assets/cat.jpg" alt="a cat"/> .shadow{} .border-radius{}
  • 29. <p style="font-family: 'Courier', Times, serif; font-size: 1em; font-weight: bold; font-style: italic;"> This is my main paragraph. I am going to try and write as long of a paragraph because I want to show different attributes and how you can style this paragraph. This is important because it is important because it is important because it is important because it is important because it is important. </p> .fonts{}
  • 30. <head> <style> body { color: blue; } h1 { color: red; } </style> </head> <body> <h1>This is a h1</h1> <h3>This is a h3</h3> <p>This is a paragraph.</p> </body> .styletag{} <!-- Style tags, inline styling and external StyleSheets are ways we can apply CSS to html. Each has its pros and cons. -->
  • 31. <head> <link rel="stylesheet“ href="./style.css" /> </head> <body> <h1>This is a h1</h1> <h3>This is a h3</h3> <p>This is a paragraph.</p> </body> .stylesheet{} /*Create a new stylesheet, it can be named anything as long as it ends in .css*/
  • 32. <!--html-> <div class="container"> <h1 id="first_container_h1">This is a h1</h1> <h3>This is a h3</h3> <p>This is a paragraph.</p> </div> <div class="container make_green"> <h1 id="second_container_h2">This is a h1</h1> <h3>This is a h3</h3> <p>This is a paragraph.</p> </div> .class{} #id{} /* css */ .container { text-align: center; } #first_container_h1 { color: blue; background-color: yellow; } /* this line makes my container turn green */ .make_green { color: green; } /* Can have multiple classes but only 1 id. Generally, use id to pick out that 1-3 specific element. It’s not important if you look only in terms of CSS but when it comes to inclusion of other languages like JS, this is an important rule of thumb as id is used for identification. */
  • 33. <!--html-> <div class="container"> <h1 id="first_container_h1">This is a h1</h1> <h3>This is a h3</h3> <p>This is a paragraph.</p> </div> <div class="container2 make_green"> <h1 id="second_container_h2">This is a h1</h1> <h3>This is a h3</h3> <p>This is a paragraph.</p> </div> .classSelectors{} /* css */ * { background-color: aqua; } .container, .container2 { text-align: center; } #first_container_h1 { color: blue; background-color: yellow; } .make_green { color: black; border: 1px solid white; } /* this line makes my container turn green when I hover over the element */ .make_green:hover { color: green; border: 1px solid black; }
  • 34. <!--html-> <div class="flex_container"> <div class="container"> <h1>1</h1> </div> <div class="container"> <h1>2</h1> </div> <div class="container"> <h1>3</h1> </div> <div class="container"> <h1>4</h1> </div> <div class="container"> <h1>5</h1> </div> </div> .flexbox{} /* css */ .flex_container { background-color: burlywood; height: 100vh; display: flex; flex-direction: row; justify-content: center; /*horizontal centering*/ align-items: center; /*vertically centering*/ } .container { width: 100px; height: 100px; margin: 10px; background-color: pink; border: 3px solid black; }