際際滷

際際滷Share a Scribd company logo
INTRODUCTION TO WED DESIGN
A detailed and practical approach to designing websites with all the
basics and design structures.
ABOUT THIS COURSE
A student will learn to critically evaluate website
quality, learn how to create and maintain quality
web pages and web standards at the same time
learning to create and manipulate images.
WHAT IS HTML?
WHAT IS HTML?
HTML is the standard markup language for creating Web pages.
HTML stands for Hyper Text Markup Language.
HTML describes the structure of a Web page and consists of a series of elements
HTML elements tell the browser how to display the content
HTML elements label pieces of content such as "this is a heading",
"this is a paragraph", "this is a link", etc.
EXAMPLE OF A BASIC HTML DOCUMENT STRUCTURE
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
WHAT IS HTML TAGS & ELEMENTS EXPLAINED?
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)
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 <h1> element defines a large heading
The <p> element defines a paragraph
WHAT IS AN HTML ELEMENT?
An HTML element is defined by a start tag, some content, and an end tag:
<tagname> Content goes here... </tagname>
The HTML element is everything from the start tag to the end tag:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements.
Empty elements do not have an end tag!
HTML PAGE STRUCTURE EXPLAINED?
HTML EDITORS & FORMATTING
Learn HTML Using NOTEPAD or TEXTEDIT
Web pages can be created and modified by using professional HTML editors.
However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac).
We believe that using a simple text editor is a good way to learn HTML.
HTML FORMATTING ELEMENTS
Formatting elements were designed to display special types of text:
<b> - Bold text
<strong> - Important text
<i> - Italic text
<em> - Emphasized text
<mark> - Marked text
<small> - Smaller text
<del> - Deleted text
<ins> - Inserted text
<sub> - Subscript text
<sup> - Superscript text
HTML ENTITIES & SPECIAL CHARACTERS.
Entity names or entity numbers can be used to display reserved HTML characters.
SOME USEFUL HTML CHARACTER ENTITIES
RESULT DESCRIPTION NAME NUMBER
non-breaking space &nbsp; &#160;
< less than &lt; &#60;
> greater than &gt; &#62;
& ampersand &amp; &#38;
" double quotation mark &quot; &#34;
' single quotation mark &apos; &#39;
蔵 cent &cent; &#162;
贈 pound &pound; &#163;
促 yen &yen; &#165;
 euro &euro; &#8364;
息 copyright &copy; &#169;
速 trademark &reg; &#174;
HTML TABLES, FORMS, LISTS ANCHOR TAGS & IMAGES
WE SHALL REFER TO THE INDEX.HTML FILE WITHIN THIS
FOLDER CALLED WEB DESIGN FOR MORE ON THESE TOPICS
SINCE THEY ARE NOW MUCH MORE PRACTICAL.
WHAT IS CSS?
CSS is the language we use to style a Web page.
CSS stands for Cascading Style Sheets and 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
WHY USE CSS?
CSS is used to define styles for your web pages, including the design, layout and variations in display for different
devices and screen sizes.
CSS SOLVED A BIG PROBLEM
When tags like <font>, and color attributes were added to the HTML 3.2 specification, it started a nightmare for web
developers. Development of large websites, where fonts and color information were added to every single page,
became a long and expensive process.
To solve this problem, the World Wide Web Consortium (W3C) created CSS.
CSS removed the style formatting from the HTML page!
CSS SAVES A LOT OF WORK!
With an external stylesheet file, you can change the look of an entire website by changing just one file!
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.
p {
color: red;
text-align: center;
}
EXAMPLE EXPLAINED
p is a selector in CSS (it points to the HTML element you want to style: <p>).
color is a property, and red is the property value
text-align is a property, and center is the property value
CSS .CLASS SELECTOR?
<html>
<head>
<style>
.intro { background-color: yellow;}
</style>
</head>
<body>
<h1>Demo of the .class selector</h1>
<div class="intro">
<p>My name is Donald.</p>
<p>I live in Duckburg.</p>
</div>
<p>My best friend is Mickey.</p>
<p class="intro">My best friend is Mickey.</p>
</body>
</html>
CSS #ID SELECTOR?
<html>
<head>
<style>
#firstname { background-color: yellow;}
</style>
</head>
<body>
<h1>Demo of the #id selector</h1>
<div class="intro">
<p id="firstname">My name is Donald.</p>
<p id="hometown">I live in Duckburg.</p>
</div>
<p>My best friend is Mickey.</p>
</body>
</html>
CSS MARGINS?
Margins are used to create space around elements, outside of any defined borders.
The CSS margin properties are used to create space around elements, outside of any defined borders.
With CSS, you have full control over the margins. There are properties for setting the margin for each side of an
element (top, right, bottom, and left).
CSS has properties for specifying the margin for each side of an element:
margin-top
margin-right
margin-bottom
margin-left
All the margin properties can have the following values:
auto - the browser calculates the margin
length - specifies a margin in px, pt, cm, etc.
% - specifies a margin in % of the width of the containing element
CSS MARGINS?
<html>
<head>
<style>
div {
border: 1px solid black; margin-top: 100px;
margin-bottom: 100px; margin-right: 150px;
margin-left: 80px;
background-color: lightblue;
}
</style>
</head>
<body>
<h2>Using individual margin properties</h2>
<div>This div element has a top margin of 100px,
a right margin of 150px, a bottom margin of 100px,
and a left margin of 80px.</div>
</body>
</html>
CSS PADDING?
Padding is used to create space around an element's content, inside of any defined borders.
The CSS padding properties are used to generate space around an element's content, inside of any defined borders.
With CSS, you have full control over the padding. There are properties for setting the padding for each side of an
element (top, right, bottom, and left).
CSS has properties for specifying the padding for each side of an element:
padding-top
padding-right
padding-bottom
padding-left
All the padding properties can have the following values:
length - specifies a padding in px, pt, cm, etc.
% - specifies a padding in % of the width of the containing element
CSS PADDING?
<html>
<head>
<style>
div {
border: 1px solid black;
background-color: lightblue;
padding-top: 50px;
padding-right: 30px;
padding-bottom: 50px;
padding-left: 80px;
}
</style>
</head>
<body>
<h2>Using individual padding properties</h2>
<div>This div element has a top padding of 50px,
a right padding of 30px, a bottom padding of 50px,
and a left padding of 80px.</div>
</body>
</html>
More questions about HTML, CSS or JS?

More Related Content

Similar to WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS) (20)

Chapter 2 - Introduction to HTML (Basic Structures and Syntax).pptx
Chapter 2 - Introduction to HTML (Basic Structures and Syntax).pptxChapter 2 - Introduction to HTML (Basic Structures and Syntax).pptx
Chapter 2 - Introduction to HTML (Basic Structures and Syntax).pptx
marjunegabon07
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
Heather Rock
Html5 css3
Html5 css3Html5 css3
Html5 css3
Altaf Pinjari
Html Workshop
Html WorkshopHtml Workshop
Html Workshop
vardanyan99
CSS.pdf
CSS.pdfCSS.pdf
CSS.pdf
SoniaJoshi25
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
vaseemshaik21
Unitegergergegegegetgegegegegegeg-2-CSS.pptx
Unitegergergegegegetgegegegegegeg-2-CSS.pptxUnitegergergegegegetgegegegegegeg-2-CSS.pptx
Unitegergergegegegetgegegegegegeg-2-CSS.pptx
VikasTuwar1
Chapter_1_Web_Technologies_Basics (CSS)_Part_2.pptx
Chapter_1_Web_Technologies_Basics (CSS)_Part_2.pptxChapter_1_Web_Technologies_Basics (CSS)_Part_2.pptx
Chapter_1_Web_Technologies_Basics (CSS)_Part_2.pptx
eyasu6
properties of css.pptx power pointpresentation
properties of css.pptx power pointpresentationproperties of css.pptx power pointpresentation
properties of css.pptx power pointpresentation
Coderkids
Vijay it 2 year
Vijay it 2 yearVijay it 2 year
Vijay it 2 year
shahilgupta
Css introduction
Css introductionCss introduction
Css introduction
Sridhar P
Introduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and JqueryIntroduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and Jquery
valuebound
Web Page Designing
Web Page DesigningWeb Page Designing
Web Page Designing
Amit Mali
Web Designing
Web DesigningWeb Designing
Web Designing
R.Karthikeyan - Vivekananda College
Unit 2 Internet and web technology CSS report
Unit 2 Internet and web technology CSS reportUnit 2 Internet and web technology CSS report
Unit 2 Internet and web technology CSS report
ajaysahusistec
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
html and css- 23091 3154 458-5d4341a0.ppt
html and css- 23091 3154 458-5d4341a0.ppthtml and css- 23091 3154 458-5d4341a0.ppt
html and css- 23091 3154 458-5d4341a0.ppt
ahoveida
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
Mario Hernandez
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
Joseph Gabriel
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
ssuser568d77
Chapter 2 - Introduction to HTML (Basic Structures and Syntax).pptx
Chapter 2 - Introduction to HTML (Basic Structures and Syntax).pptxChapter 2 - Introduction to HTML (Basic Structures and Syntax).pptx
Chapter 2 - Introduction to HTML (Basic Structures and Syntax).pptx
marjunegabon07
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
Heather Rock
Html Workshop
Html WorkshopHtml Workshop
Html Workshop
vardanyan99
Unitegergergegegegetgegegegegegeg-2-CSS.pptx
Unitegergergegegegetgegegegegegeg-2-CSS.pptxUnitegergergegegegetgegegegegegeg-2-CSS.pptx
Unitegergergegegegetgegegegegegeg-2-CSS.pptx
VikasTuwar1
Chapter_1_Web_Technologies_Basics (CSS)_Part_2.pptx
Chapter_1_Web_Technologies_Basics (CSS)_Part_2.pptxChapter_1_Web_Technologies_Basics (CSS)_Part_2.pptx
Chapter_1_Web_Technologies_Basics (CSS)_Part_2.pptx
eyasu6
properties of css.pptx power pointpresentation
properties of css.pptx power pointpresentationproperties of css.pptx power pointpresentation
properties of css.pptx power pointpresentation
Coderkids
Vijay it 2 year
Vijay it 2 yearVijay it 2 year
Vijay it 2 year
shahilgupta
Css introduction
Css introductionCss introduction
Css introduction
Sridhar P
Introduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and JqueryIntroduction to Html5, css, Javascript and Jquery
Introduction to Html5, css, Javascript and Jquery
valuebound
Web Page Designing
Web Page DesigningWeb Page Designing
Web Page Designing
Amit Mali
Unit 2 Internet and web technology CSS report
Unit 2 Internet and web technology CSS reportUnit 2 Internet and web technology CSS report
Unit 2 Internet and web technology CSS report
ajaysahusistec
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
html and css- 23091 3154 458-5d4341a0.ppt
html and css- 23091 3154 458-5d4341a0.ppthtml and css- 23091 3154 458-5d4341a0.ppt
html and css- 23091 3154 458-5d4341a0.ppt
ahoveida
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
Mario Hernandez
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
Joseph Gabriel
SDP_-_Module_4.ppt
SDP_-_Module_4.pptSDP_-_Module_4.ppt
SDP_-_Module_4.ppt
ssuser568d77

Recently uploaded (20)

CEE Software Development M&A Report 2025
CEE Software Development M&A Report 2025CEE Software Development M&A Report 2025
CEE Software Development M&A Report 2025
Yevgen Sysoyev
Introduction to Generative AI refers to a subset of artificial intelligence
Introduction to Generative AI refers to a subset of artificial intelligenceIntroduction to Generative AI refers to a subset of artificial intelligence
Introduction to Generative AI refers to a subset of artificial intelligence
Kongu Engineering College, Perundurai, Erode
AI Breakthroughs and Innovations-Whats Next.docx
AI Breakthroughs and Innovations-Whats Next.docxAI Breakthroughs and Innovations-Whats Next.docx
AI Breakthroughs and Innovations-Whats Next.docx
AIvolut
Least Privilege AWS IAM Role Permissions
Least Privilege AWS IAM Role PermissionsLeast Privilege AWS IAM Role Permissions
Least Privilege AWS IAM Role Permissions
Chris Wahl
New from BookNet Canada for 2025: BNC SalesData and BNC LibraryData
New from BookNet Canada for 2025: BNC SalesData and BNC LibraryDataNew from BookNet Canada for 2025: BNC SalesData and BNC LibraryData
New from BookNet Canada for 2025: BNC SalesData and BNC LibraryData
BookNet Canada
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing EnvironmentsAutomated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Pablo G坦mez Abajo
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-WorldAll-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
Safe Software
Q1 FY26 TUG Leader Quarterly Call - APAC / EMEA
Q1 FY26 TUG Leader Quarterly Call - APAC / EMEAQ1 FY26 TUG Leader Quarterly Call - APAC / EMEA
Q1 FY26 TUG Leader Quarterly Call - APAC / EMEA
lward7
Cloudflares Game-Changing Move The First Remote MCP Server for AI Agent Deve...
Cloudflares Game-Changing Move The First Remote MCP Server for AI Agent Deve...Cloudflares Game-Changing Move The First Remote MCP Server for AI Agent Deve...
Cloudflares Game-Changing Move The First Remote MCP Server for AI Agent Deve...
davidandersonofficia
Network_Packet_Brokers_Presentation.pptx
Network_Packet_Brokers_Presentation.pptxNetwork_Packet_Brokers_Presentation.pptx
Network_Packet_Brokers_Presentation.pptx
Khushi Communications
FutureProofing the Nordic Economy with GenAI
FutureProofing the Nordic Economy with GenAIFutureProofing the Nordic Economy with GenAI
FutureProofing the Nordic Economy with GenAI
Pete Nieminen
From SBOMs to xBOMs to Transparency - Pavel Shukhman at OWASP Ottawa on 2025-...
From SBOMs to xBOMs to Transparency - Pavel Shukhman at OWASP Ottawa on 2025-...From SBOMs to xBOMs to Transparency - Pavel Shukhman at OWASP Ottawa on 2025-...
From SBOMs to xBOMs to Transparency - Pavel Shukhman at OWASP Ottawa on 2025-...
Pavel Shukhman
Smarter RAG Pipelines: Scaling Search with Milvus and Feast
Smarter RAG Pipelines: Scaling Search with Milvus and FeastSmarter RAG Pipelines: Scaling Search with Milvus and Feast
Smarter RAG Pipelines: Scaling Search with Milvus and Feast
Zilliz
Human Centered Design By Gnanasambandham
Human Centered Design By GnanasambandhamHuman Centered Design By Gnanasambandham
Human Centered Design By Gnanasambandham
Gnanasambandham Anbazhagan CSP, CSM, CSPO
Top Tips to Get Your Data AI-Ready
Top Tips to Get Your Data AI-Ready   Top Tips to Get Your Data AI-Ready
Top Tips to Get Your Data AI-Ready
Precisely
Introduction to PHP from Beginning to End
Introduction to PHP from Beginning to EndIntroduction to PHP from Beginning to End
Introduction to PHP from Beginning to End
christopherneo4
Transactional Outbox & Inbox Patterns.pptx
Transactional Outbox & Inbox Patterns.pptxTransactional Outbox & Inbox Patterns.pptx
Transactional Outbox & Inbox Patterns.pptx
Maysam Mousa
AI Driven Posture Analysis Fall Detection System for the Elderly.pdf
AI Driven Posture Analysis Fall Detection System for the Elderly.pdfAI Driven Posture Analysis Fall Detection System for the Elderly.pdf
AI Driven Posture Analysis Fall Detection System for the Elderly.pdf
Patrick Ogbuitepu
APAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdfAPAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdf
GDG on Campus Monash
Ricardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno - A Structural CAD TechnicianRicardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno
CEE Software Development M&A Report 2025
CEE Software Development M&A Report 2025CEE Software Development M&A Report 2025
CEE Software Development M&A Report 2025
Yevgen Sysoyev
AI Breakthroughs and Innovations-Whats Next.docx
AI Breakthroughs and Innovations-Whats Next.docxAI Breakthroughs and Innovations-Whats Next.docx
AI Breakthroughs and Innovations-Whats Next.docx
AIvolut
Least Privilege AWS IAM Role Permissions
Least Privilege AWS IAM Role PermissionsLeast Privilege AWS IAM Role Permissions
Least Privilege AWS IAM Role Permissions
Chris Wahl
New from BookNet Canada for 2025: BNC SalesData and BNC LibraryData
New from BookNet Canada for 2025: BNC SalesData and BNC LibraryDataNew from BookNet Canada for 2025: BNC SalesData and BNC LibraryData
New from BookNet Canada for 2025: BNC SalesData and BNC LibraryData
BookNet Canada
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing EnvironmentsAutomated Engineering of Domain-Specific Metamorphic Testing Environments
Automated Engineering of Domain-Specific Metamorphic Testing Environments
Pablo G坦mez Abajo
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-WorldAll-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
All-Data, Any-AI Integration: FME & Amazon Bedrock in the Real-World
Safe Software
Q1 FY26 TUG Leader Quarterly Call - APAC / EMEA
Q1 FY26 TUG Leader Quarterly Call - APAC / EMEAQ1 FY26 TUG Leader Quarterly Call - APAC / EMEA
Q1 FY26 TUG Leader Quarterly Call - APAC / EMEA
lward7
Cloudflares Game-Changing Move The First Remote MCP Server for AI Agent Deve...
Cloudflares Game-Changing Move The First Remote MCP Server for AI Agent Deve...Cloudflares Game-Changing Move The First Remote MCP Server for AI Agent Deve...
Cloudflares Game-Changing Move The First Remote MCP Server for AI Agent Deve...
davidandersonofficia
Network_Packet_Brokers_Presentation.pptx
Network_Packet_Brokers_Presentation.pptxNetwork_Packet_Brokers_Presentation.pptx
Network_Packet_Brokers_Presentation.pptx
Khushi Communications
FutureProofing the Nordic Economy with GenAI
FutureProofing the Nordic Economy with GenAIFutureProofing the Nordic Economy with GenAI
FutureProofing the Nordic Economy with GenAI
Pete Nieminen
From SBOMs to xBOMs to Transparency - Pavel Shukhman at OWASP Ottawa on 2025-...
From SBOMs to xBOMs to Transparency - Pavel Shukhman at OWASP Ottawa on 2025-...From SBOMs to xBOMs to Transparency - Pavel Shukhman at OWASP Ottawa on 2025-...
From SBOMs to xBOMs to Transparency - Pavel Shukhman at OWASP Ottawa on 2025-...
Pavel Shukhman
Smarter RAG Pipelines: Scaling Search with Milvus and Feast
Smarter RAG Pipelines: Scaling Search with Milvus and FeastSmarter RAG Pipelines: Scaling Search with Milvus and Feast
Smarter RAG Pipelines: Scaling Search with Milvus and Feast
Zilliz
Top Tips to Get Your Data AI-Ready
Top Tips to Get Your Data AI-Ready   Top Tips to Get Your Data AI-Ready
Top Tips to Get Your Data AI-Ready
Precisely
Introduction to PHP from Beginning to End
Introduction to PHP from Beginning to EndIntroduction to PHP from Beginning to End
Introduction to PHP from Beginning to End
christopherneo4
Transactional Outbox & Inbox Patterns.pptx
Transactional Outbox & Inbox Patterns.pptxTransactional Outbox & Inbox Patterns.pptx
Transactional Outbox & Inbox Patterns.pptx
Maysam Mousa
AI Driven Posture Analysis Fall Detection System for the Elderly.pdf
AI Driven Posture Analysis Fall Detection System for the Elderly.pdfAI Driven Posture Analysis Fall Detection System for the Elderly.pdf
AI Driven Posture Analysis Fall Detection System for the Elderly.pdf
Patrick Ogbuitepu
APAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdfAPAC Solutions Challenge Info Session.pdf
APAC Solutions Challenge Info Session.pdf
GDG on Campus Monash
Ricardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno - A Structural CAD TechnicianRicardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno - A Structural CAD Technician
Ricardo Jebb Bruno

WEBSITE DESIGN AND DEVELOPMENT WITH CASCADING STYLE SHEETS(CSS)

  • 1. INTRODUCTION TO WED DESIGN A detailed and practical approach to designing websites with all the basics and design structures. ABOUT THIS COURSE A student will learn to critically evaluate website quality, learn how to create and maintain quality web pages and web standards at the same time learning to create and manipulate images.
  • 2. WHAT IS HTML? WHAT IS HTML? HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text Markup Language. HTML describes the structure of a Web page and consists of a series of elements HTML elements tell the browser how to display the content HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc. EXAMPLE OF A BASIC HTML DOCUMENT STRUCTURE <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
  • 3. WHAT IS HTML TAGS & ELEMENTS EXPLAINED? 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) 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 <h1> element defines a large heading The <p> element defines a paragraph WHAT IS AN HTML ELEMENT? An HTML element is defined by a start tag, some content, and an end tag: <tagname> Content goes here... </tagname> The HTML element is everything from the start tag to the end tag: <h1>My First Heading</h1> <p>My first paragraph.</p> Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag!
  • 4. HTML PAGE STRUCTURE EXPLAINED?
  • 5. HTML EDITORS & FORMATTING Learn HTML Using NOTEPAD or TEXTEDIT Web pages can be created and modified by using professional HTML editors. However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac). We believe that using a simple text editor is a good way to learn HTML. HTML FORMATTING ELEMENTS Formatting elements were designed to display special types of text: <b> - Bold text <strong> - Important text <i> - Italic text <em> - Emphasized text <mark> - Marked text <small> - Smaller text <del> - Deleted text <ins> - Inserted text <sub> - Subscript text <sup> - Superscript text
  • 6. HTML ENTITIES & SPECIAL CHARACTERS. Entity names or entity numbers can be used to display reserved HTML characters. SOME USEFUL HTML CHARACTER ENTITIES RESULT DESCRIPTION NAME NUMBER non-breaking space &nbsp; &#160; < less than &lt; &#60; > greater than &gt; &#62; & ampersand &amp; &#38; " double quotation mark &quot; &#34; ' single quotation mark &apos; &#39; 蔵 cent &cent; &#162; 贈 pound &pound; &#163; 促 yen &yen; &#165; euro &euro; &#8364; 息 copyright &copy; &#169; 速 trademark &reg; &#174;
  • 7. HTML TABLES, FORMS, LISTS ANCHOR TAGS & IMAGES WE SHALL REFER TO THE INDEX.HTML FILE WITHIN THIS FOLDER CALLED WEB DESIGN FOR MORE ON THESE TOPICS SINCE THEY ARE NOW MUCH MORE PRACTICAL.
  • 8. WHAT IS CSS? CSS is the language we use to style a Web page. CSS stands for Cascading Style Sheets and 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 WHY USE CSS? CSS is used to define styles for your web pages, including the design, layout and variations in display for different devices and screen sizes. CSS SOLVED A BIG PROBLEM When tags like <font>, and color attributes were added to the HTML 3.2 specification, it started a nightmare for web developers. Development of large websites, where fonts and color information were added to every single page, became a long and expensive process. To solve this problem, the World Wide Web Consortium (W3C) created CSS. CSS removed the style formatting from the HTML page! CSS SAVES A LOT OF WORK! With an external stylesheet file, you can change the look of an entire website by changing just one file!
  • 9. 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. p { color: red; text-align: center; } EXAMPLE EXPLAINED p is a selector in CSS (it points to the HTML element you want to style: <p>). color is a property, and red is the property value text-align is a property, and center is the property value
  • 10. CSS .CLASS SELECTOR? <html> <head> <style> .intro { background-color: yellow;} </style> </head> <body> <h1>Demo of the .class selector</h1> <div class="intro"> <p>My name is Donald.</p> <p>I live in Duckburg.</p> </div> <p>My best friend is Mickey.</p> <p class="intro">My best friend is Mickey.</p> </body> </html>
  • 11. CSS #ID SELECTOR? <html> <head> <style> #firstname { background-color: yellow;} </style> </head> <body> <h1>Demo of the #id selector</h1> <div class="intro"> <p id="firstname">My name is Donald.</p> <p id="hometown">I live in Duckburg.</p> </div> <p>My best friend is Mickey.</p> </body> </html>
  • 12. CSS MARGINS? Margins are used to create space around elements, outside of any defined borders. The CSS margin properties are used to create space around elements, outside of any defined borders. With CSS, you have full control over the margins. There are properties for setting the margin for each side of an element (top, right, bottom, and left). CSS has properties for specifying the margin for each side of an element: margin-top margin-right margin-bottom margin-left All the margin properties can have the following values: auto - the browser calculates the margin length - specifies a margin in px, pt, cm, etc. % - specifies a margin in % of the width of the containing element
  • 13. CSS MARGINS? <html> <head> <style> div { border: 1px solid black; margin-top: 100px; margin-bottom: 100px; margin-right: 150px; margin-left: 80px; background-color: lightblue; } </style> </head> <body> <h2>Using individual margin properties</h2> <div>This div element has a top margin of 100px, a right margin of 150px, a bottom margin of 100px, and a left margin of 80px.</div> </body> </html>
  • 14. CSS PADDING? Padding is used to create space around an element's content, inside of any defined borders. The CSS padding properties are used to generate space around an element's content, inside of any defined borders. With CSS, you have full control over the padding. There are properties for setting the padding for each side of an element (top, right, bottom, and left). CSS has properties for specifying the padding for each side of an element: padding-top padding-right padding-bottom padding-left All the padding properties can have the following values: length - specifies a padding in px, pt, cm, etc. % - specifies a padding in % of the width of the containing element
  • 15. CSS PADDING? <html> <head> <style> div { border: 1px solid black; background-color: lightblue; padding-top: 50px; padding-right: 30px; padding-bottom: 50px; padding-left: 80px; } </style> </head> <body> <h2>Using individual padding properties</h2> <div>This div element has a top padding of 50px, a right padding of 30px, a bottom padding of 50px, and a left padding of 80px.</div> </body> </html>
  • 16. More questions about HTML, CSS or JS?