SlideShare a Scribd company logo
HTML, CSS,
JAVASCRIPT
For Beginners
Prakriti Dhang
22-06-2020
HTML
Hyper Text Markup Language
HTML
• Abbreviation for Hyper Text Markup Language
• Is the standard markup language for creating web pages.
• Easy to understand
• Well Organized
• Front-end programming language
• saved with a .html extension
HTML elements
• HTML elements has starting tag, contents and closing tag
<tagname> content </tagname>
• The closing tag ends with a backslash (/).
• The start tag and close tag name should be same.
• <h1> content </h1>
HTML elements
• <!DOCTYPE html> defines that this document is an
HTML5 document.
• <html> element is the root element of an HTML page
• <head> element contains meta information about the
HTML page
• <title> element specifies a title for the HTML page (shown
in the browser's title bar)
• <body> element defines the document's body.
• The <h1> element defines a large heading
• The <p> element defines a paragraph
Body elements
• Body tag contains all the visible contents,
 Headings (h1-h6),
 Paragraphs,
 Images,
 Hyperlinks,
 Tables,
 Lists, etc.
Example
• <!DOCTYPE html>
• <html>
• <head>
• <title> Example 1</title>
• </head>
• <body>
• <h1> WELCOME! </h1>
• <p>Welcome to my first page.</p>
• </body>
• </html>
CSS
Cascading Style Sheet
CSS
• CSS Stands for Cascading Style Sheets
• Easy to understand
• Well Organized
• Front-end programming language
• saved with a .css extension when use external CSS.
CSS syntax
h1 {
color: yellow;
text-align: center;
}
• <h1> is the selector in CSS.
• Color is the property and yellow is the value.
• Text-align is the property and center is the value
Ways to insert CSS
• There are 3 ways to insert CSS:
1. Internal: The internal style is defined inside the
<style> element, inside the head section.
2. External: Can be written in any text editor, and
must be saved with a .css extension. The external
.css file should not contain any HTML tags.
3. Inline: add the style attribute to the element. The
style attribute can contain any CSS property.
Internal CSS
• <!DOCTYPE html>
• <html>
• <head>
• <title> Example 1 </title>
• <style>
• body {
• background-color: lightgreen;
• }
• h1 {
• color: yellow;
• text-align: center;
• }
• p {
• font-family: Arial;
• font-size: 20px;
• font-style:italic;
• }
• </style>
• </head>
• <body>
• <h1> WELCOME! </h1>
• <p>Welcome to my first page.</p>
• </body>
• </html>
External CSS
In Example.html
<!DOCTYPE html>
<html>
<head>
<title>Example 1</title>
<link rel="stylesheet" type="text/css"
href=“stylesheet1.css">
</head>
<body>
<h1> WELCOME! </h1>
<p>Welcome to my first page.</p>
</body>
</html>
In stylesheet.css
body {
background-color: lightgreen;
}
h1 {
color: yellow;
text-align: center;
}
p {
font-family: Arial;
font-size: 20px;
font-style:italic;
}
Inline CSS
<!DOCTYPE html>
<html>
<body style="background-color: lightgreen;">
<h1 style="color:yellow;text-align:center;">This is a
heading</h1>
<p style="font-family: Arial; font-size: 20px; font-
style:italic; ">This is a paragraph.</p>
</body>
</html>
CSS selectors
1. Id selector:
• The id of an element is unique within a page.
• The id selector is used to select one unique element.
• Write a hash (#) character, before the id of the element.
2. Class selector:
• The class selector selects HTML elements with a specific
class attribute.
• To select elements with a specific class, write a dot (.)
character, before the class name.
Example
• <!DOCTYPE html>
• <html>
• <head>
• <title> Example 2</title>
• <style>
• body {
• background-color: lightgreen;
• }
• #head1 {
• color: yellow;
• text-align: center;
• }
• .para1{
• font-family: Arial;
• font-size: 20px;
• font-style:italic;
• }
• </style>
• </head>
• <body>
• <h1 id=“head1”> WELCOME! </h1>
• <p class=“para1”>Welcome to my first page.</p>
• </body>
• </html>
JAVASCRIPT
JavaScript
• Is a programming language
• Is used for creating websites
• Easy to learn.
• Standalone language
• Used to make dynamic webpages
• Add special effects on webpages like rollover, roll out and
many types of graphics.
• saved with a .js extension.
Inline JavaScript
• <!DOCTYPE html>
• <html>
• <head>
• <title> Example 1</title>
• <style>
• body {
• background-color: lightgreen;
• }
• #head1{
• color: yellow;
• text-align: center;
• }
• .para1 {
• font-family: Arial;
• font-size: 20px;
• font-style:italic;
• }
• </style>
• </head>
• <body>
• <h1 id="head1"> WELCOME! </h1>
• <p class="para1">Welcome to my first page.</p>
• <h2 id="head2"></h2>
• <button type="button" onclick='document.getElementById("head2").innerHTML = "This is JavaScript!"'>Click Me!</button>
• </body>
• </html>
Internal JavaScript
• <!DOCTYPE html>
• <html>
• <head>
• <title> Example 1</title>
• <style>
• body {
• background-color: lightgreen;
• }
• #head1{
• color: yellow;
• text-align: center;
• }
• .para1 {
• font-family: Arial;
• font-size: 20px;
• font-style:italic;
• }
• </style>
• <script>
• function clickme(){
• document.getElementById("head2").innerHTML = "This is JavaScript";
• }
• </script>
• </head>
• <body>
• <h1 id="head1"> WELCOME! </h1>
• <p class="para1">Welcome to my first page.</p>
• <h2 id="head2"> </h2>
• <button type="button" onclick="clickme()">Click Me!</button>
• </body>
• </html>
External JavaScript
• <!DOCTYPE html>
• <html>
• <head>
• <title> Example 1</title>
• <script type="text/javascript" src="exjse.js"></script>
• <style>
• body {
• background-color: lightgreen;
• }
• #head1{
• color: yellow;
• text-align: center;
• }
• .para1 {
• font-family: Arial;
• font-size: 20px;
• font-style:italic;
• }
• </style>
• </head>
• <body>
• <h1 id="head1"> WELCOME! </h1>
• <p class="para1">Welcome to my first page.</p>
• <h2 id="head2"> </h2>
• <button type="button" onclick="clickme()">Click Me!</button>
• </body>
• </html>
Add this code in a new file and name as exjse.js
function clickme(){
document.getElementById("head2").innerHTML
= "This is JavaScript";
}
Practice
1. Create a web page with a title “My tour”
• Use heading size 2, “My trip to ….” . Add a paragraph
and write about the place. Your name should be in
head size 4.
• Use external css. Add text color to both headings and
paragraph, the heading should be in bold and
paragraph should be in italics. Add background color
to light blue.
• Use external JavaScript, when clicking the button, it
should display your name.
In Next Lesson we will learn
• How to use lists, tables, images and hyperlinks.
• Use javascript to resize image size.
Thank You

More Related Content

What's hot

presentation in html,css,javascript
presentation in html,css,javascriptpresentation in html,css,javascript
presentation in html,css,javascript
FaysalAhammed5
 
Intro to html
Intro to htmlIntro to html
Intro to html
anshuman rahi
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
Fahim Abdullah
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
Sun Technlogies
 
Introduction to HTML
Introduction to HTML Introduction to HTML
Introduction to HTML
Professional Guru
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
Ana Cidre
 
Lecture 2 introduction to html
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to html
palhaftab
 
Html and css
Html and cssHtml and css
Html and css
Samiksha Pun
 
Html,javascript & css
Html,javascript & cssHtml,javascript & css
Html,javascript & css
Predhin Sapru
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
Anjan Mahanta
 
Learning Html
Learning HtmlLearning Html
Learning Html
Damian Gonz
 
HTML & CSS
HTML & CSSHTML & CSS
HTML & CSS
lexinamer
 
Javascript
JavascriptJavascript
Javascript
mussawir20
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
Sayan De
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
Knoldus Inc.
 
Html Intro2
Html Intro2Html Intro2
Html Intro2mlackner
 
HTML (Web) basics for a beginner
HTML (Web) basics for a beginnerHTML (Web) basics for a beginner
HTML (Web) basics for a beginner
Jayapal Reddy Nimmakayala
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
shabab shihan
 

What's hot (20)

presentation in html,css,javascript
presentation in html,css,javascriptpresentation in html,css,javascript
presentation in html,css,javascript
 
Intro to html
Intro to htmlIntro to html
Intro to html
 
An Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java ScriptAn Overview of HTML, CSS & Java Script
An Overview of HTML, CSS & Java Script
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
 
Introduction to HTML
Introduction to HTML Introduction to HTML
Introduction to HTML
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
 
Lecture 2 introduction to html
Lecture 2  introduction to htmlLecture 2  introduction to html
Lecture 2 introduction to html
 
Html and css
Html and cssHtml and css
Html and css
 
Html,javascript & css
Html,javascript & cssHtml,javascript & css
Html,javascript & css
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
 
Html presentation
Html presentationHtml presentation
Html presentation
 
Learning Html
Learning HtmlLearning Html
Learning Html
 
HTML & CSS
HTML & CSSHTML & CSS
HTML & CSS
 
Javascript
JavascriptJavascript
Javascript
 
Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
Html Intro2
Html Intro2Html Intro2
Html Intro2
 
HTML (Web) basics for a beginner
HTML (Web) basics for a beginnerHTML (Web) basics for a beginner
HTML (Web) basics for a beginner
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
CSS
CSSCSS
CSS
 

Similar to HTML, CSS, JavaScript for beginners

What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
Ahsan Rahim
 
Html coding
Html codingHtml coding
Html coding
Briana VanBuskirk
 
Basics ogHtml
Basics ogHtml Basics ogHtml
Basics ogHtml
rohitkumar2468
 
Unit2_2024.pptx are related to PHP HTML CSS
Unit2_2024.pptx are related to PHP HTML CSSUnit2_2024.pptx are related to PHP HTML CSS
Unit2_2024.pptx are related to PHP HTML CSS
abhinandankondekar2
 
VAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptxVAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV481101
 
Html cia
Html ciaHtml cia
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
Java script and html
Java script and htmlJava script and html
Java script and html
Malik M. Ali Shahid
 
Java script and html new
Java script and html newJava script and html new
Java script and html new
Malik M. Ali Shahid
 
Quan Head Tag Presentation
Quan Head Tag PresentationQuan Head Tag Presentation
Quan Head Tag PresentationQuanslides
 
presentation_web_design_basic_1595487867_382444.pptx
presentation_web_design_basic_1595487867_382444.pptxpresentation_web_design_basic_1595487867_382444.pptx
presentation_web_design_basic_1595487867_382444.pptx
ssuser3a64ac
 
DESIGN THINKING SYLLABUS MATERIAL NOTES UNIT 1 .pptx
DESIGN THINKING SYLLABUS MATERIAL NOTES UNIT 1 .pptxDESIGN THINKING SYLLABUS MATERIAL NOTES UNIT 1 .pptx
DESIGN THINKING SYLLABUS MATERIAL NOTES UNIT 1 .pptx
bmit1
 
10x10 presentation Edited 4
10x10 presentation Edited 410x10 presentation Edited 4
10x10 presentation Edited 4Samabamma
 

Similar to HTML, CSS, JavaScript for beginners (20)

6. Css
6. Css6. Css
6. Css
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
 
Html coding
Html codingHtml coding
Html coding
 
Basics ogHtml
Basics ogHtml Basics ogHtml
Basics ogHtml
 
Html2
Html2Html2
Html2
 
Unit2_2024.pptx are related to PHP HTML CSS
Unit2_2024.pptx are related to PHP HTML CSSUnit2_2024.pptx are related to PHP HTML CSS
Unit2_2024.pptx are related to PHP HTML CSS
 
VAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptxVAIBHAV JAIN WEB TECHNOLOGY.pptx
VAIBHAV JAIN WEB TECHNOLOGY.pptx
 
Html cia
Html ciaHtml cia
Html cia
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
Html
HtmlHtml
Html
 
Java script and html
Java script and htmlJava script and html
Java script and html
 
Java script and html new
Java script and html newJava script and html new
Java script and html new
 
Intro to HTML
Intro to HTMLIntro to HTML
Intro to HTML
 
Quan Head Tag Presentation
Quan Head Tag PresentationQuan Head Tag Presentation
Quan Head Tag Presentation
 
presentation_web_design_basic_1595487867_382444.pptx
presentation_web_design_basic_1595487867_382444.pptxpresentation_web_design_basic_1595487867_382444.pptx
presentation_web_design_basic_1595487867_382444.pptx
 
Html
HtmlHtml
Html
 
DESIGN THINKING SYLLABUS MATERIAL NOTES UNIT 1 .pptx
DESIGN THINKING SYLLABUS MATERIAL NOTES UNIT 1 .pptxDESIGN THINKING SYLLABUS MATERIAL NOTES UNIT 1 .pptx
DESIGN THINKING SYLLABUS MATERIAL NOTES UNIT 1 .pptx
 
10x10 presentation Edited 4
10x10 presentation Edited 410x10 presentation Edited 4
10x10 presentation Edited 4
 
Khoa dang (kay)
Khoa dang (kay)Khoa dang (kay)
Khoa dang (kay)
 
Html intro
Html introHtml intro
Html intro
 

Recently uploaded

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 

Recently uploaded (20)

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 

HTML, CSS, JavaScript for beginners

  • 3. HTML • Abbreviation for Hyper Text Markup Language • Is the standard markup language for creating web pages. • Easy to understand • Well Organized • Front-end programming language • saved with a .html extension
  • 4. HTML elements • HTML elements has starting tag, contents and closing tag <tagname> content </tagname> • The closing tag ends with a backslash (/). • The start tag and close tag name should be same. • <h1> content </h1>
  • 5. HTML elements • <!DOCTYPE html> defines that this document is an HTML5 document. • <html> element is the root element of an HTML page • <head> element contains meta information about the HTML page • <title> element specifies a title for the HTML page (shown in the browser's title bar) • <body> element defines the document's body. • The <h1> element defines a large heading • The <p> element defines a paragraph
  • 6. Body elements • Body tag contains all the visible contents,  Headings (h1-h6),  Paragraphs,  Images,  Hyperlinks,  Tables,  Lists, etc.
  • 7. Example • <!DOCTYPE html> • <html> • <head> • <title> Example 1</title> • </head> • <body> • <h1> WELCOME! </h1> • <p>Welcome to my first page.</p> • </body> • </html>
  • 9. CSS • CSS Stands for Cascading Style Sheets • Easy to understand • Well Organized • Front-end programming language • saved with a .css extension when use external CSS.
  • 10. CSS syntax h1 { color: yellow; text-align: center; } • <h1> is the selector in CSS. • Color is the property and yellow is the value. • Text-align is the property and center is the value
  • 11. Ways to insert CSS • There are 3 ways to insert CSS: 1. Internal: The internal style is defined inside the <style> element, inside the head section. 2. External: Can be written in any text editor, and must be saved with a .css extension. The external .css file should not contain any HTML tags. 3. Inline: add the style attribute to the element. The style attribute can contain any CSS property.
  • 12. Internal CSS • <!DOCTYPE html> • <html> • <head> • <title> Example 1 </title> • <style> • body { • background-color: lightgreen; • } • h1 { • color: yellow; • text-align: center; • } • p { • font-family: Arial; • font-size: 20px; • font-style:italic; • } • </style> • </head> • <body> • <h1> WELCOME! </h1> • <p>Welcome to my first page.</p> • </body> • </html>
  • 13. External CSS In Example.html <!DOCTYPE html> <html> <head> <title>Example 1</title> <link rel="stylesheet" type="text/css" href=“stylesheet1.css"> </head> <body> <h1> WELCOME! </h1> <p>Welcome to my first page.</p> </body> </html> In stylesheet.css body { background-color: lightgreen; } h1 { color: yellow; text-align: center; } p { font-family: Arial; font-size: 20px; font-style:italic; }
  • 14. Inline CSS <!DOCTYPE html> <html> <body style="background-color: lightgreen;"> <h1 style="color:yellow;text-align:center;">This is a heading</h1> <p style="font-family: Arial; font-size: 20px; font- style:italic; ">This is a paragraph.</p> </body> </html>
  • 15. CSS selectors 1. Id selector: • The id of an element is unique within a page. • The id selector is used to select one unique element. • Write a hash (#) character, before the id of the element. 2. Class selector: • The class selector selects HTML elements with a specific class attribute. • To select elements with a specific class, write a dot (.) character, before the class name.
  • 16. Example • <!DOCTYPE html> • <html> • <head> • <title> Example 2</title> • <style> • body { • background-color: lightgreen; • } • #head1 { • color: yellow; • text-align: center; • } • .para1{ • font-family: Arial; • font-size: 20px; • font-style:italic; • } • </style> • </head> • <body> • <h1 id=“head1”> WELCOME! </h1> • <p class=“para1”>Welcome to my first page.</p> • </body> • </html>
  • 18. JavaScript • Is a programming language • Is used for creating websites • Easy to learn. • Standalone language • Used to make dynamic webpages • Add special effects on webpages like rollover, roll out and many types of graphics. • saved with a .js extension.
  • 19. Inline JavaScript • <!DOCTYPE html> • <html> • <head> • <title> Example 1</title> • <style> • body { • background-color: lightgreen; • } • #head1{ • color: yellow; • text-align: center; • } • .para1 { • font-family: Arial; • font-size: 20px; • font-style:italic; • } • </style> • </head> • <body> • <h1 id="head1"> WELCOME! </h1> • <p class="para1">Welcome to my first page.</p> • <h2 id="head2"></h2> • <button type="button" onclick='document.getElementById("head2").innerHTML = "This is JavaScript!"'>Click Me!</button> • </body> • </html>
  • 20. Internal JavaScript • <!DOCTYPE html> • <html> • <head> • <title> Example 1</title> • <style> • body { • background-color: lightgreen; • } • #head1{ • color: yellow; • text-align: center; • } • .para1 { • font-family: Arial; • font-size: 20px; • font-style:italic; • } • </style> • <script> • function clickme(){ • document.getElementById("head2").innerHTML = "This is JavaScript"; • } • </script> • </head> • <body> • <h1 id="head1"> WELCOME! </h1> • <p class="para1">Welcome to my first page.</p> • <h2 id="head2"> </h2> • <button type="button" onclick="clickme()">Click Me!</button> • </body> • </html>
  • 21. External JavaScript • <!DOCTYPE html> • <html> • <head> • <title> Example 1</title> • <script type="text/javascript" src="exjse.js"></script> • <style> • body { • background-color: lightgreen; • } • #head1{ • color: yellow; • text-align: center; • } • .para1 { • font-family: Arial; • font-size: 20px; • font-style:italic; • } • </style> • </head> • <body> • <h1 id="head1"> WELCOME! </h1> • <p class="para1">Welcome to my first page.</p> • <h2 id="head2"> </h2> • <button type="button" onclick="clickme()">Click Me!</button> • </body> • </html> Add this code in a new file and name as exjse.js function clickme(){ document.getElementById("head2").innerHTML = "This is JavaScript"; }
  • 22. Practice 1. Create a web page with a title “My tour” • Use heading size 2, “My trip to ….” . Add a paragraph and write about the place. Your name should be in head size 4. • Use external css. Add text color to both headings and paragraph, the heading should be in bold and paragraph should be in italics. Add background color to light blue. • Use external JavaScript, when clicking the button, it should display your name.
  • 23. In Next Lesson we will learn • How to use lists, tables, images and hyperlinks. • Use javascript to resize image size.