SlideShare a Scribd company logo
1
HTML & CSS
2
HTML Basics
 HTML stands for Hyper Text Markup Language
 HTML is the standard markup language for creating Web pages
 HTML describes the structure of a Web page
 HTML consists of a series of elements
 HTML elements tell the browser how to display the content
 HTML is Not Case Sensitive
3
Example of HTML Code
<!DOCTYPE html>
<html>
<head>
<title>Title of Page</title>
</head>
<body>
<p> Life begins at the end <br> of your comfort zone </p>
</body>
</html>
4
Explanation of the Example
 The <!DOCTYPE html> declaration defines that this
document is an HTML5 document.
 The <html> element is the root element of an HTML page.
 The <head> element contains meta information about the
HTML page.
 The <title> element specifies a title for the HTML page (which
is shown in the browser's title bar or in the page's tab).
5
Explanation of the Example
 The <body> element defines the document's body,
and is a container for all the visible contents, such as
headings, paragraphs, images, hyperlinks, tables, lists,
etc.
 The <p> element defines a paragraph.
6
HTML Basics
 Every HTML document begins with an HTML
document tag. Although this is not mandatory, it is a
good convention to start the document with this
below-mentioned tag.
 <!DOCTYPE html>
 Every HTML code must be enclosed between basic
HTML tags. It begins with <html> and ends
with </html> tag.
7
HTML Basics
 The head tag comes next which contains all the
header information of the web page or documents
like the title of the page and other miscellaneous
information. This information is enclosed within the
head tag which opens with <head> and ends
with </head>.
 We can mention the title of a web page using
the <title> tag. This is header information and hence
is mentioned within the header tags. The tag begins
with <title> and ends with </title>.
8
HTML Basics
 The body tag contains the actual body of the page
which will be visible to all the users. This opens
with <body> and ends with </body>. All content is
enclosed within this tag.
9
HTML Elements
 The HTML element is everything from the start tag to the
end tag:
<tagname> Content goes here... </tagname>
 Example
<p> is starting tag of a paragraph, and </p> is
closing tag of the same paragraph but,
<p> This is paragraph </p>
is an element.
10
HTML Elements
 Empty Elements
 Some HTML elements have no content (like the <br>
element). These elements are called empty
elements. Empty elements do not have an end tag.
 Nested HTML Elements
 An element within an element is called nested
element.
11
Example of Nested Element
<!DOCTYPE html>
<html>
<head>
<title> My first Program </title>
</head>
<body>
<p>My first paragraph</p>
</body>
</html>
12
HTML Attributes
 Attributes provide additional information about
elements. They are always specified in the start tag.
Example
 <img> Element
 <img src=“image.jpg" alt=“alternative text“
width="500" height="600">
 src, alt, width and height are attributes of <img>
13
HTML Attributes
 <a> element
 <a href="https://www.google.com"> click here </a>
 Href is an attribute of <a>
 <p> element
 <p align=“left”> This is left aligned </p>
 Align is an attribute of <p>
14
HTML Basics
 HTML Headings
 These tags help us to give headings to the content of a
webpage. These tags are mainly written inside the body
tag. HTML provides us with six heading tags
from <h1> to <h6>. <h1> defines the most important
heading. Every tag displays the heading in a different
style and font size.
 HTML Paragraph
 These tags help us to write paragraph statements on a
webpage. They start with the <p> tag and ends
with </p>.
15
HTML Basics
 HTML Break
These tags are used for inserting a single line type break. It does
not have any closing tag. In HTML the break tag is written as <br>.
Example:
<!DOCTYPE html>
<html>
<head>
<title> My first Program </title>
</head>
<body>
<p> Life begins at the end <br> of your comfort zone </p>
</body>
</html>
16
 HTML Horizontal Line
 The <hr> tag is used to break the page into various parts,
creating horizontal margins with help of a horizontal line
running from the left to right-hand side of the page. This is
also an empty tag and doesn’t take any additional
statements.
 HTML Images
 The image tag is used to insert an image into our web
page. <img src=”source_of_image” alt=“alternative
text“>
HTML Basics
17
HTML Basics
 Anchor Tag
 The <a> tag defines a hyperlink, which is used to link
from one page to another.
 <a href="https://www.google.com"> click here</a>
 <b> Tag
 This is used to bold the text.
 <p>This is normal text<b>and this is bold
text</b></p>
18
 <i> Tag
 It is used to italicize the text in HTML
 <p><i>This is Italicized text</i>This is simple text</p>
 <u> Tag
 It is used to underline the text in HTML.
 <p>This is some <u>underlined</u> text.</p>
HTML Basics
19
CSS
(Cascading Style Sheet)
20
What is CSS
 CSS stands for Cascading Style Sheets
 CSS describes how HTML elements are to be
displayed on screen, paper, or in other media
 CSS saves a lot of work. It can control the layout of
multiple web pages all at once
 External stylesheets are stored in CSS files
21
CSS Syntax
 The selector points to the HTML element you want to
style.
 The declaration block contains one or more declarations
separated by semicolons.
 Each declaration includes a CSS property name and a
value, separated by a colon.
 Multiple CSS declarations are separated with semicolons,
and declaration blocks are surrounded by curly braces.
22
How to add CSS
 There are three ways of inserting CSS
 External CSS
 Internal CSS
 Inline CSS
 External CSS
 With an external style sheet, we can change the look of
an entire website by changing just one file!
 Each HTML page must include a reference to the
external style sheet file inside the <link> element, inside
the head section.
23
Example of External CSS
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="m
ystyle.css">
</head>
<body>
<h1>heading</h1>
<p>paragraph.</p>
</body>
</html>
 External styles are defined
within the <link> element,
inside the <head> section
of an HTML page
 An external style sheet
can be written in any text
editor, and must be
saved with a .css
extension.
 With an external style
sheet, you can change
the look of an entire
website by changing just
one file
24
Example of External CSS
 Here is how the
"mystyle.css" file looks:
body {
background-
color: lightblue;
}
h1 {
color: navy;
margin-left: 20px;
}
25
Example of Internal CSS
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: pink; }
h1 {
color: blue;
margin-left: 40px; }
</style>
</head>
<body>
<h1>heading</h1>
<p>paragraph.</p>
</body>
</html>
 An internal style sheet
may be used if one single
HTML page has a unique
style.
 Internal styles are defined
within the <style>
element, inside the
<head> section of an
HTML page
26
Example of Inline CSS
<!DOCTYPE html>
<html>
<body>
<h1 style="color:blue;text-
align:center;">heading</h1>
<p style="color:red;">paragra
ph.</p>
</body>
</html>
 An inline style may be
used to apply a unique
style for a single element.
 To use inline styles, add
the style attribute to the
relevant element. The
style attribute can
contain any CSS
property.
27
Multiple Style Sheets
 If some properties have been defined for the same
selector (element) in different style sheets, the value
from the last read style sheet will be used.
 Assume that an external style sheet has the following
style for the <h1> element:
 h1 {
color: red;
}
28
Multiple Style Sheets
 Then, assume that an internal style sheet also has the
following style for the <h1> element:
 h1{
color: blue;
}
 Now, if the internal style is defined after the link to the
external style sheet, the <h1> elements will be “blue“:
29
Multiple Style Sheets
<head>
<link rel="stylesheet“ href="mystyle.css">
<style>
h1 {
color: blue;
}
</style>
</head>
30
Multiple Style Sheets
 If the internal style is
defined before the link
to the external style
sheet, the <h1>
elements will be “red":
<head>
<style>
h1 {
color: blue;
}
</style>
<link rel="stylesheet“
href="mystyle.css">
</head>
31
Multiple Style Sheets
 If the internal style is defined before the link to the
external style sheet, but still we want blue color for
<h1> elements. Then we have to use !important rule.
 The !important rule in CSS is used to add more
importance to a property/value than normal.
 In fact, if we use the !important rule, it will override ALL
previous styling rules for that specific property on that
element.
32
Multiple Style Sheets
<head>
<style>
h1 {
color: blue !important;
}
</style>
<link rel="stylesheet“
href="mystyle.css">
</head>
 Now, the <h1>
elements will be
“blue”.

More Related Content

Similar to HTML, CSS BASICS OF HTML AND CSS USED IN WEBSITE.pptx (20)

Introduction to Web Technology and Web Page Development
Introduction to Web Technology and Web Page DevelopmentIntroduction to Web Technology and Web Page Development
Introduction to Web Technology and Web Page Development
BhargaviDalal4
 
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
 
Unit 1-HTML Final.ppt
Unit 1-HTML Final.pptUnit 1-HTML Final.ppt
Unit 1-HTML Final.ppt
TusharTikia
 
Introduction to HTML Communication Skills
Introduction to HTML Communication SkillsIntroduction to HTML Communication Skills
Introduction to HTML Communication Skills
GraceChokoli1
 
ppt.ppt
ppt.pptppt.ppt
ppt.ppt
Sana903754
 
htmlbcjdkkdkcjcjcjfkjccjckcjcjc_doc1.pptx
htmlbcjdkkdkcjcjcjfkjccjckcjcjc_doc1.pptxhtmlbcjdkkdkcjcjcjfkjccjckcjcjc_doc1.pptx
htmlbcjdkkdkcjcjcjfkjccjckcjcjc_doc1.pptx
DSAISUBRAHMANYAAASHR
 
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
 
HTML5 and CSS Fundamentals MOOC Course College Presentation
HTML5 and CSS Fundamentals MOOC Course College PresentationHTML5 and CSS Fundamentals MOOC Course College Presentation
HTML5 and CSS Fundamentals MOOC Course College Presentation
KuchBhi90
 
Web Design & Development - Session 2
Web Design & Development - Session 2Web Design & Development - Session 2
Web Design & Development - Session 2
Shahrzad Peyman
 
WebDesigning.pptx
WebDesigning.pptxWebDesigning.pptx
WebDesigning.pptx
PranshuYadav27
 
Web Information Systems Html and css
Web Information Systems Html and cssWeb Information Systems Html and css
Web Information Systems Html and css
Artificial Intelligence Institute at UofSC
 
Fccwc326
Fccwc326Fccwc326
Fccwc326
Shannon Gallagher
 
Basic HTML/CSS
Basic HTML/CSSBasic HTML/CSS
Basic HTML/CSS
Chris Heiden
 
FYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcssFYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcss
Arti Parab Academics
 
Basic Html Knowledge for students
Basic Html Knowledge for studentsBasic Html Knowledge for students
Basic Html Knowledge for students
vethics
 
html
htmlhtml
html
tumetr1
 
HTML.ppt
HTML.pptHTML.ppt
HTML.ppt
BISWARANJANSAHOO78
 
Html & Html5 from scratch
Html & Html5 from scratchHtml & Html5 from scratch
Html & Html5 from scratch
Ahmad Al-ammar
 
2a web technology html basics 1
2a web technology html basics 12a web technology html basics 1
2a web technology html basics 1
Jyoti Yadav
 
Simple intro to HTML and its applications
Simple intro to HTML and its applicationsSimple intro to HTML and its applications
Simple intro to HTML and its applications
S.Mohideen Badhusha
 
Introduction to Web Technology and Web Page Development
Introduction to Web Technology and Web Page DevelopmentIntroduction to Web Technology and Web Page Development
Introduction to Web Technology and Web Page Development
BhargaviDalal4
 
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
 
Unit 1-HTML Final.ppt
Unit 1-HTML Final.pptUnit 1-HTML Final.ppt
Unit 1-HTML Final.ppt
TusharTikia
 
Introduction to HTML Communication Skills
Introduction to HTML Communication SkillsIntroduction to HTML Communication Skills
Introduction to HTML Communication Skills
GraceChokoli1
 
htmlbcjdkkdkcjcjcjfkjccjckcjcjc_doc1.pptx
htmlbcjdkkdkcjcjcjfkjccjckcjcjc_doc1.pptxhtmlbcjdkkdkcjcjcjfkjccjckcjcjc_doc1.pptx
htmlbcjdkkdkcjcjcjfkjccjckcjcjc_doc1.pptx
DSAISUBRAHMANYAAASHR
 
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
 
HTML5 and CSS Fundamentals MOOC Course College Presentation
HTML5 and CSS Fundamentals MOOC Course College PresentationHTML5 and CSS Fundamentals MOOC Course College Presentation
HTML5 and CSS Fundamentals MOOC Course College Presentation
KuchBhi90
 
Web Design & Development - Session 2
Web Design & Development - Session 2Web Design & Development - Session 2
Web Design & Development - Session 2
Shahrzad Peyman
 
FYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcssFYBSC IT Web Programming Unit I HTML 5 & andcss
FYBSC IT Web Programming Unit I HTML 5 & andcss
Arti Parab Academics
 
Basic Html Knowledge for students
Basic Html Knowledge for studentsBasic Html Knowledge for students
Basic Html Knowledge for students
vethics
 
Html & Html5 from scratch
Html & Html5 from scratchHtml & Html5 from scratch
Html & Html5 from scratch
Ahmad Al-ammar
 
2a web technology html basics 1
2a web technology html basics 12a web technology html basics 1
2a web technology html basics 1
Jyoti Yadav
 
Simple intro to HTML and its applications
Simple intro to HTML and its applicationsSimple intro to HTML and its applications
Simple intro to HTML and its applications
S.Mohideen Badhusha
 

Recently uploaded (20)

Intranet Examples That Are Changing the Way We Work
Intranet Examples That Are Changing the Way We WorkIntranet Examples That Are Changing the Way We Work
Intranet Examples That Are Changing the Way We Work
BizPortals Solutions
 
grade 9 ai project cycle Artificial intelligence.pptx
grade 9 ai project cycle Artificial intelligence.pptxgrade 9 ai project cycle Artificial intelligence.pptx
grade 9 ai project cycle Artificial intelligence.pptx
manikumar465287
 
aswjkdwelhjdfshlfjkhewljhfljawerhwjarhwjkahrjar
aswjkdwelhjdfshlfjkhewljhfljawerhwjarhwjkahrjaraswjkdwelhjdfshlfjkhewljhfljawerhwjarhwjkahrjar
aswjkdwelhjdfshlfjkhewljhfljawerhwjarhwjkahrjar
muhammadalikhanalikh1
 
How AI Can Improve Media Quality Testing Across Platforms (1).pptx
How AI Can Improve Media Quality Testing Across Platforms (1).pptxHow AI Can Improve Media Quality Testing Across Platforms (1).pptx
How AI Can Improve Media Quality Testing Across Platforms (1).pptx
kalichargn70th171
 
Topic 26 Security Testing Considerations.pptx
Topic 26 Security Testing Considerations.pptxTopic 26 Security Testing Considerations.pptx
Topic 26 Security Testing Considerations.pptx
marutnand8
 
Delivering More with Less: AI Driven Resource Management with OnePlan
Delivering More with Less: AI Driven Resource Management with OnePlan Delivering More with Less: AI Driven Resource Management with OnePlan
Delivering More with Less: AI Driven Resource Management with OnePlan
OnePlan Solutions
 
SQL-COMMANDS instructionsssssssssss.pptx
SQL-COMMANDS instructionsssssssssss.pptxSQL-COMMANDS instructionsssssssssss.pptx
SQL-COMMANDS instructionsssssssssss.pptx
Ashlei5
 
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdfHow to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
QuickBooks Training
 
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdfBoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
Ortus Solutions, Corp
 
Marketing And Sales Software Services.pptx
Marketing And Sales Software Services.pptxMarketing And Sales Software Services.pptx
Marketing And Sales Software Services.pptx
julia smits
 
Custom Software Development: Types, Applications and Benefits.pdf
Custom Software Development: Types, Applications and Benefits.pdfCustom Software Development: Types, Applications and Benefits.pdf
Custom Software Development: Types, Applications and Benefits.pdf
Digital Aptech
 
Online Queue Management System for Public Service Offices [Focused on Municip...
Online Queue Management System for Public Service Offices [Focused on Municip...Online Queue Management System for Public Service Offices [Focused on Municip...
Online Queue Management System for Public Service Offices [Focused on Municip...
Rishab Acharya
 
Feeling Lost in the Blue? Exploring a New Path: AI Mental Health Counselling ...
Feeling Lost in the Blue? Exploring a New Path: AI Mental Health Counselling ...Feeling Lost in the Blue? Exploring a New Path: AI Mental Health Counselling ...
Feeling Lost in the Blue? Exploring a New Path: AI Mental Health Counselling ...
officeiqai
 
Issues in AI Presentation and machine learning.pptx
Issues in AI Presentation and machine learning.pptxIssues in AI Presentation and machine learning.pptx
Issues in AI Presentation and machine learning.pptx
Jalalkhan657136
 
Agentic AI Desgin Principles in five slides.pptx
Agentic AI Desgin Principles in five slides.pptxAgentic AI Desgin Principles in five slides.pptx
Agentic AI Desgin Principles in five slides.pptx
MOSIUOA WESI
 
Secure and Simplify IT Management with ManageEngine Endpoint Central.pdf
Secure and Simplify IT Management with ManageEngine Endpoint Central.pdfSecure and Simplify IT Management with ManageEngine Endpoint Central.pdf
Secure and Simplify IT Management with ManageEngine Endpoint Central.pdf
Northwind Technologies
 
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
Nacho Cougil
 
Software Risk and Quality management.pptx
Software Risk and Quality management.pptxSoftware Risk and Quality management.pptx
Software Risk and Quality management.pptx
HassanBangash9
 
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfol...
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfol...List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfol...
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfol...
Philip Schwarz
 
Shortcomings of EHS Software – And How to Overcome Them
Shortcomings of EHS Software – And How to Overcome ThemShortcomings of EHS Software – And How to Overcome Them
Shortcomings of EHS Software – And How to Overcome Them
TECH EHS Solution
 
Intranet Examples That Are Changing the Way We Work
Intranet Examples That Are Changing the Way We WorkIntranet Examples That Are Changing the Way We Work
Intranet Examples That Are Changing the Way We Work
BizPortals Solutions
 
grade 9 ai project cycle Artificial intelligence.pptx
grade 9 ai project cycle Artificial intelligence.pptxgrade 9 ai project cycle Artificial intelligence.pptx
grade 9 ai project cycle Artificial intelligence.pptx
manikumar465287
 
aswjkdwelhjdfshlfjkhewljhfljawerhwjarhwjkahrjar
aswjkdwelhjdfshlfjkhewljhfljawerhwjarhwjkahrjaraswjkdwelhjdfshlfjkhewljhfljawerhwjarhwjkahrjar
aswjkdwelhjdfshlfjkhewljhfljawerhwjarhwjkahrjar
muhammadalikhanalikh1
 
How AI Can Improve Media Quality Testing Across Platforms (1).pptx
How AI Can Improve Media Quality Testing Across Platforms (1).pptxHow AI Can Improve Media Quality Testing Across Platforms (1).pptx
How AI Can Improve Media Quality Testing Across Platforms (1).pptx
kalichargn70th171
 
Topic 26 Security Testing Considerations.pptx
Topic 26 Security Testing Considerations.pptxTopic 26 Security Testing Considerations.pptx
Topic 26 Security Testing Considerations.pptx
marutnand8
 
Delivering More with Less: AI Driven Resource Management with OnePlan
Delivering More with Less: AI Driven Resource Management with OnePlan Delivering More with Less: AI Driven Resource Management with OnePlan
Delivering More with Less: AI Driven Resource Management with OnePlan
OnePlan Solutions
 
SQL-COMMANDS instructionsssssssssss.pptx
SQL-COMMANDS instructionsssssssssss.pptxSQL-COMMANDS instructionsssssssssss.pptx
SQL-COMMANDS instructionsssssssssss.pptx
Ashlei5
 
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdfHow to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
How to Generate Financial Statements in QuickBooks Like a Pro (1).pdf
QuickBooks Training
 
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdfBoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
BoxLang-Dynamic-AWS-Lambda by Luis Majano.pdf
Ortus Solutions, Corp
 
Marketing And Sales Software Services.pptx
Marketing And Sales Software Services.pptxMarketing And Sales Software Services.pptx
Marketing And Sales Software Services.pptx
julia smits
 
Custom Software Development: Types, Applications and Benefits.pdf
Custom Software Development: Types, Applications and Benefits.pdfCustom Software Development: Types, Applications and Benefits.pdf
Custom Software Development: Types, Applications and Benefits.pdf
Digital Aptech
 
Online Queue Management System for Public Service Offices [Focused on Municip...
Online Queue Management System for Public Service Offices [Focused on Municip...Online Queue Management System for Public Service Offices [Focused on Municip...
Online Queue Management System for Public Service Offices [Focused on Municip...
Rishab Acharya
 
Feeling Lost in the Blue? Exploring a New Path: AI Mental Health Counselling ...
Feeling Lost in the Blue? Exploring a New Path: AI Mental Health Counselling ...Feeling Lost in the Blue? Exploring a New Path: AI Mental Health Counselling ...
Feeling Lost in the Blue? Exploring a New Path: AI Mental Health Counselling ...
officeiqai
 
Issues in AI Presentation and machine learning.pptx
Issues in AI Presentation and machine learning.pptxIssues in AI Presentation and machine learning.pptx
Issues in AI Presentation and machine learning.pptx
Jalalkhan657136
 
Agentic AI Desgin Principles in five slides.pptx
Agentic AI Desgin Principles in five slides.pptxAgentic AI Desgin Principles in five slides.pptx
Agentic AI Desgin Principles in five slides.pptx
MOSIUOA WESI
 
Secure and Simplify IT Management with ManageEngine Endpoint Central.pdf
Secure and Simplify IT Management with ManageEngine Endpoint Central.pdfSecure and Simplify IT Management with ManageEngine Endpoint Central.pdf
Secure and Simplify IT Management with ManageEngine Endpoint Central.pdf
Northwind Technologies
 
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
How John started to like TDD (instead of hating it) (ViennaJUG, June'25)
Nacho Cougil
 
Software Risk and Quality management.pptx
Software Risk and Quality management.pptxSoftware Risk and Quality management.pptx
Software Risk and Quality management.pptx
HassanBangash9
 
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfol...
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfol...List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfol...
List Unfolding - 'unfold' as the Computational Dual of 'fold', and how 'unfol...
Philip Schwarz
 
Shortcomings of EHS Software – And How to Overcome Them
Shortcomings of EHS Software – And How to Overcome ThemShortcomings of EHS Software – And How to Overcome Them
Shortcomings of EHS Software – And How to Overcome Them
TECH EHS Solution
 
Ad

HTML, CSS BASICS OF HTML AND CSS USED IN WEBSITE.pptx

  • 2. 2 HTML Basics  HTML stands for Hyper Text Markup Language  HTML is the standard markup language for creating Web pages  HTML describes the structure of a Web page  HTML consists of a series of elements  HTML elements tell the browser how to display the content  HTML is Not Case Sensitive
  • 3. 3 Example of HTML Code <!DOCTYPE html> <html> <head> <title>Title of Page</title> </head> <body> <p> Life begins at the end <br> of your comfort zone </p> </body> </html>
  • 4. 4 Explanation of the Example  The <!DOCTYPE html> declaration defines that this document is an HTML5 document.  The <html> element is the root element of an HTML page.  The <head> element contains meta information about the HTML page.  The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab).
  • 5. 5 Explanation of the Example  The <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.  The <p> element defines a paragraph.
  • 6. 6 HTML Basics  Every HTML document begins with an HTML document tag. Although this is not mandatory, it is a good convention to start the document with this below-mentioned tag.  <!DOCTYPE html>  Every HTML code must be enclosed between basic HTML tags. It begins with <html> and ends with </html> tag.
  • 7. 7 HTML Basics  The head tag comes next which contains all the header information of the web page or documents like the title of the page and other miscellaneous information. This information is enclosed within the head tag which opens with <head> and ends with </head>.  We can mention the title of a web page using the <title> tag. This is header information and hence is mentioned within the header tags. The tag begins with <title> and ends with </title>.
  • 8. 8 HTML Basics  The body tag contains the actual body of the page which will be visible to all the users. This opens with <body> and ends with </body>. All content is enclosed within this tag.
  • 9. 9 HTML Elements  The HTML element is everything from the start tag to the end tag: <tagname> Content goes here... </tagname>  Example <p> is starting tag of a paragraph, and </p> is closing tag of the same paragraph but, <p> This is paragraph </p> is an element.
  • 10. 10 HTML Elements  Empty Elements  Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag.  Nested HTML Elements  An element within an element is called nested element.
  • 11. 11 Example of Nested Element <!DOCTYPE html> <html> <head> <title> My first Program </title> </head> <body> <p>My first paragraph</p> </body> </html>
  • 12. 12 HTML Attributes  Attributes provide additional information about elements. They are always specified in the start tag. Example  <img> Element  <img src=“image.jpg" alt=“alternative text“ width="500" height="600">  src, alt, width and height are attributes of <img>
  • 13. 13 HTML Attributes  <a> element  <a href="https://www.google.com"> click here </a>  Href is an attribute of <a>  <p> element  <p align=“left”> This is left aligned </p>  Align is an attribute of <p>
  • 14. 14 HTML Basics  HTML Headings  These tags help us to give headings to the content of a webpage. These tags are mainly written inside the body tag. HTML provides us with six heading tags from <h1> to <h6>. <h1> defines the most important heading. Every tag displays the heading in a different style and font size.  HTML Paragraph  These tags help us to write paragraph statements on a webpage. They start with the <p> tag and ends with </p>.
  • 15. 15 HTML Basics  HTML Break These tags are used for inserting a single line type break. It does not have any closing tag. In HTML the break tag is written as <br>. Example: <!DOCTYPE html> <html> <head> <title> My first Program </title> </head> <body> <p> Life begins at the end <br> of your comfort zone </p> </body> </html>
  • 16. 16  HTML Horizontal Line  The <hr> tag is used to break the page into various parts, creating horizontal margins with help of a horizontal line running from the left to right-hand side of the page. This is also an empty tag and doesn’t take any additional statements.  HTML Images  The image tag is used to insert an image into our web page. <img src=”source_of_image” alt=“alternative text“> HTML Basics
  • 17. 17 HTML Basics  Anchor Tag  The <a> tag defines a hyperlink, which is used to link from one page to another.  <a href="https://www.google.com"> click here</a>  <b> Tag  This is used to bold the text.  <p>This is normal text<b>and this is bold text</b></p>
  • 18. 18  <i> Tag  It is used to italicize the text in HTML  <p><i>This is Italicized text</i>This is simple text</p>  <u> Tag  It is used to underline the text in HTML.  <p>This is some <u>underlined</u> text.</p> HTML Basics
  • 20. 20 What is CSS  CSS stands for Cascading Style Sheets  CSS describes how HTML elements are to be displayed on screen, paper, or in other media  CSS saves a lot of work. It can control the layout of multiple web pages all at once  External stylesheets are stored in CSS files
  • 21. 21 CSS Syntax  The selector points to the HTML element you want to style.  The declaration block contains one or more declarations separated by semicolons.  Each declaration includes a CSS property name and a value, separated by a colon.  Multiple CSS declarations are separated with semicolons, and declaration blocks are surrounded by curly braces.
  • 22. 22 How to add CSS  There are three ways of inserting CSS  External CSS  Internal CSS  Inline CSS  External CSS  With an external style sheet, we can change the look of an entire website by changing just one file!  Each HTML page must include a reference to the external style sheet file inside the <link> element, inside the head section.
  • 23. 23 Example of External CSS <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="m ystyle.css"> </head> <body> <h1>heading</h1> <p>paragraph.</p> </body> </html>  External styles are defined within the <link> element, inside the <head> section of an HTML page  An external style sheet can be written in any text editor, and must be saved with a .css extension.  With an external style sheet, you can change the look of an entire website by changing just one file
  • 24. 24 Example of External CSS  Here is how the "mystyle.css" file looks: body { background- color: lightblue; } h1 { color: navy; margin-left: 20px; }
  • 25. 25 Example of Internal CSS <!DOCTYPE html> <html> <head> <style> body { background-color: pink; } h1 { color: blue; margin-left: 40px; } </style> </head> <body> <h1>heading</h1> <p>paragraph.</p> </body> </html>  An internal style sheet may be used if one single HTML page has a unique style.  Internal styles are defined within the <style> element, inside the <head> section of an HTML page
  • 26. 26 Example of Inline CSS <!DOCTYPE html> <html> <body> <h1 style="color:blue;text- align:center;">heading</h1> <p style="color:red;">paragra ph.</p> </body> </html>  An inline style may be used to apply a unique style for a single element.  To use inline styles, add the style attribute to the relevant element. The style attribute can contain any CSS property.
  • 27. 27 Multiple Style Sheets  If some properties have been defined for the same selector (element) in different style sheets, the value from the last read style sheet will be used.  Assume that an external style sheet has the following style for the <h1> element:  h1 { color: red; }
  • 28. 28 Multiple Style Sheets  Then, assume that an internal style sheet also has the following style for the <h1> element:  h1{ color: blue; }  Now, if the internal style is defined after the link to the external style sheet, the <h1> elements will be “blue“:
  • 29. 29 Multiple Style Sheets <head> <link rel="stylesheet“ href="mystyle.css"> <style> h1 { color: blue; } </style> </head>
  • 30. 30 Multiple Style Sheets  If the internal style is defined before the link to the external style sheet, the <h1> elements will be “red": <head> <style> h1 { color: blue; } </style> <link rel="stylesheet“ href="mystyle.css"> </head>
  • 31. 31 Multiple Style Sheets  If the internal style is defined before the link to the external style sheet, but still we want blue color for <h1> elements. Then we have to use !important rule.  The !important rule in CSS is used to add more importance to a property/value than normal.  In fact, if we use the !important rule, it will override ALL previous styling rules for that specific property on that element.
  • 32. 32 Multiple Style Sheets <head> <style> h1 { color: blue !important; } </style> <link rel="stylesheet“ href="mystyle.css"> </head>  Now, the <h1> elements will be “blue”.

Editor's Notes

  • #3: stands for "document type declaration
  • #4: stands for "document type declaration. data about data=metadata <title>, <meta>, <link>, <script>
  • #6: stands for "document type declaration