SlideShare a Scribd company logo
INTRODUCTION
TO
HTML AND CSS
A BEGINNER FRIENDLY SESSION
Google Developer Students Club
Indian Institute Of Information Technology Kota
INTRODUCTION
HTML BOILER PLATE
BASIC TAGS
TABLES
DIVISION
FORM
TOPICS TO
BE
COVERED
INTRODUCTION
WAYS TO INSERT CSS
ANATOMY AND SYNTAX
SELECTORS
BOX MODEL
POSITIONING
BASIC PROPERTIES
INTRODUCTION
INTRODUCTION
TO
TO
HTML
HTML
ABOUT HTML
HTML means Hyper Text
Markup Language.
HTML is NOT a programming
language, it’s a markup
language, which means its
purpose is to give structure
to the content of the
website, not to define an
algorithm.
HTML BOILER PLATE
A boilerplate in HTML is a template you
will add at the start of your project. You
should add this boilerplate to all of your
HTML pages.
To install the extension : open in browser
Now type html and press enter at html:5.
To add a boiler plate in VS Code
HTML TAGS
HEADING TAG
HTML headings are defined with the <h1>
to <h6> tags.
<h1> defines the most important heading
and
<h6> defines the least important heading.
PARAGRAPH TAG
IMAGE TAG
The <p> tag defines a paragraph (text block).
src - Specifies the path to the image
alt - Specifies an alternate text for the image
The HTML <img> tag is used to embed an image in a web page.
The <img> tag has two required attributes:
DIV TAG
ANCHOR TAG
The <a> HTML element , with its href attribute, creates a hyperlink to web pages,
files, email addresses, locations in the same page, or anything else a URL can
address.
The <div> tag defines a division or a
section in an HTML document.
The <div> tag is used as a container for
HTML elements.
ORDERD LISTS
1 2 UNORDERED LISTS
An ordered list starts with the
<ol> tag.
1
LISTS
HTML lists allow web developers to group a set of related items in lists.
Each list item starts with the <li> tag.
An unordered list starts with the
<ul> tag
1
TABLE
HTML tables allow web developers to
arrange data into rows and columns.
<td>
<th>
<tr>
Each table row starts with a <tr> and
ends with a </tr> tag.
Each table cell is defined by a <td>
and a </td> tag which contains the
content of the table cell.
This is used when you want your cells to
be header cells adding a heading to them.
<label>
<input type="text">
<input type="email">
<input type="checkbox">
<input type="submit">
An HTML form is used to collect user input. The HTML <form> element is used.
An <input> element can be displayed in many ways, depending on the type attribute.
and more.
HTML FORM
INTRODUCTION
INTRODUCTION
TO
TO
CSS
CSS
ABOUT CSS
CSS stands for Cascading
Style Sheets. It is a style
sheet language that is used
to describe the look and
formatting of a document
written in a markup
language.
CSS is added to HTML pages
to format the document
according to information in
the style sheet.
There are three ways to
insert CSS in HTML
documents.
WAYS TO INSERT CSS
Inline
External
Internal
ANATOMY AND 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.
PROPERTIES
Font size
Font style
Colour
Background colour
Text alignment
Border
Margins
Padding
#town{
background-color:lightgray;
color: brown;
border: 2px solid darkred;
margin: 20px;
padding: 20px;
}
SELECTORS
There are several different types of selectors in CSS.
The element selector selects the HTML
element by name.
CSS Element Selector <style>
p{
text-align: center;
color: blue;
}
</style>
CSS Id Selector
The id selector selects the id attribute of an
HTML element to select a specific element.
An id is always unique within the page so it
is chosen to select a single, unique
element.
<style>
#para1 {
text-align: center;
color: blue;
}
</style>
The class selector selects HTML elements
with a specific class attribute. It is used with
a period character . followed by the class
name.
CSS Class Selector
CSS Group Selector
The grouping selector is used to select all the
elements with the same style definitions.
Grouping selector is used to minimize the code.
Commas are used to separate each selector in
grouping.
<style>
h1, h2, p {
text-align: center;
color: blue;
}
</style>
<style>
.para1{
text-align: center;
color: blue;
}
</style>
BOX MODEL:
The CSS box model is essentially a
box that wraps around every HTML
element. It consists of: margins,
borders, padding, and the actual
content.
POSITIONING IN CSS
Fixed
The position property specifies the type of positioning method used for an
element.
Absolute Relative Static
COMMENTS
Z-INDEX
The comment tag is used to insert comments in the source code. Comments are
not displayed in the browsers.
The z-index property
specifies the stack order
of an element.
We may use z-index:-1 if
we want the element to
be present at the
backward position.
<!--This is a comment. Comments are not displayed in the browser-->
img {
position:absolute;
z-index: -1;
}
HTML:
https://developer.mozilla.org/en-US/docs/Web/HTML
https://www.w3schools.com/html/default.asp
CSS:
https://www.w3schools.com/css/
https://developer.mozilla.org/en-US/docs/Web/CSS
RESOURCES
THANK YOU
THANK YOU

More Related Content

Similar to HTML CSS.pdf

HTML_HEADER PART TAGS .pptx
HTML_HEADER              PART TAGS .pptxHTML_HEADER              PART TAGS .pptx
HTML_HEADER PART TAGS .pptx
HARIPRIYAV25
 
How to learn HTML in 10 Days
How to learn HTML in 10 DaysHow to learn HTML in 10 Days
How to learn HTML in 10 Days
Manoj kumar Deswal
 
HTML - LinkedIn
HTML - LinkedInHTML - LinkedIn
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
GmachImen
 
Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...
Aditya Dwivedi
 
Html
HtmlHtml
html tags
html tagshtml tags
html tags
Kunal gupta
 
Html
HtmlHtml
PPT-203105353-1.pdf
PPT-203105353-1.pdfPPT-203105353-1.pdf
PPT-203105353-1.pdf
PINTUCHAUHAN8
 
HTML
HTMLHTML
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
 
Web(chap2)
Web(chap2)Web(chap2)
Web(chap2)
Jafar Nesargi
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
DipaliJagtap6
 
Html
HtmlHtml
Html
HtmlHtml
Hyper Text Mark-up Language
Hyper Text Mark-up Language Hyper Text Mark-up Language
Hyper Text Mark-up Language
Fritz Earlin Therese Lapitaje Pondantes
 
Html
HtmlHtml
HTML - part 1
HTML - part 1HTML - part 1
HTML - part 1
Fahad Masood
 
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet css
Tesfaye Yenealem
 
CSS Part I
CSS Part ICSS Part I
CSS Part I
Doncho Minkov
 

Similar to HTML CSS.pdf (20)

HTML_HEADER PART TAGS .pptx
HTML_HEADER              PART TAGS .pptxHTML_HEADER              PART TAGS .pptx
HTML_HEADER PART TAGS .pptx
 
How to learn HTML in 10 Days
How to learn HTML in 10 DaysHow to learn HTML in 10 Days
How to learn HTML in 10 Days
 
HTML - LinkedIn
HTML - LinkedInHTML - LinkedIn
HTML - LinkedIn
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
 
Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...
 
Html
HtmlHtml
Html
 
html tags
html tagshtml tags
html tags
 
Html
HtmlHtml
Html
 
PPT-203105353-1.pdf
PPT-203105353-1.pdfPPT-203105353-1.pdf
PPT-203105353-1.pdf
 
HTML
HTMLHTML
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
 
Web(chap2)
Web(chap2)Web(chap2)
Web(chap2)
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Html
HtmlHtml
Html
 
Html
HtmlHtml
Html
 
Hyper Text Mark-up Language
Hyper Text Mark-up Language Hyper Text Mark-up Language
Hyper Text Mark-up Language
 
Html
HtmlHtml
Html
 
HTML - part 1
HTML - part 1HTML - part 1
HTML - part 1
 
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet css
 
CSS Part I
CSS Part ICSS Part I
CSS Part I
 

Recently uploaded

Ch-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdfCh-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdf
lakshayrojroj
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
indexPub
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
EduSkills OECD
 
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
andagarcia212
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
Kalna College
 
How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
Celine George
 
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
ShwetaGawande8
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
zuzanka
 
Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024
khabri85
 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
Kalna College
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
nitinpv4ai
 
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxA Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
OH TEIK BIN
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
TechSoup
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
danielkiash986
 
How to Setup Default Value for a Field in Odoo 17
How to Setup Default Value for a Field in Odoo 17How to Setup Default Value for a Field in Odoo 17
How to Setup Default Value for a Field in Odoo 17
Celine George
 
Diversity Quiz Prelims by Quiz Club, IIT Kanpur
Diversity Quiz Prelims by Quiz Club, IIT KanpurDiversity Quiz Prelims by Quiz Club, IIT Kanpur
Diversity Quiz Prelims by Quiz Club, IIT Kanpur
Quiz Club IIT Kanpur
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
Steve Thomason
 

Recently uploaded (20)

Ch-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdfCh-4 Forest Society and colonialism 2.pdf
Ch-4 Forest Society and colonialism 2.pdf
 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
 
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
THE SACRIFICE HOW PRO-PALESTINE PROTESTS STUDENTS ARE SACRIFICING TO CHANGE T...
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
Andreas Schleicher presents PISA 2022 Volume III - Creative Thinking - 18 Jun...
 
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
欧洲杯下注-欧洲杯下注押注官网-欧洲杯下注押注网站|【​网址​🎉ac44.net🎉​】
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx78 Microsoft-Publisher - Sirin Sultana Bora.pptx
78 Microsoft-Publisher - Sirin Sultana Bora.pptx
 
How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17How to Manage Reception Report in Odoo 17
How to Manage Reception Report in Odoo 17
 
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
INTRODUCTION TO HOSPITALS & AND ITS ORGANIZATION
 
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptxRESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
RESULTS OF THE EVALUATION QUESTIONNAIRE.pptx
 
Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024Brand Guideline of Bashundhara A4 Paper - 2024
Brand Guideline of Bashundhara A4 Paper - 2024
 
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
220711130100 udita Chakraborty  Aims and objectives of national policy on inf...220711130100 udita Chakraborty  Aims and objectives of national policy on inf...
220711130100 udita Chakraborty Aims and objectives of national policy on inf...
 
Bonku-Babus-Friend by Sathyajith Ray (9)
Bonku-Babus-Friend by Sathyajith Ray  (9)Bonku-Babus-Friend by Sathyajith Ray  (9)
Bonku-Babus-Friend by Sathyajith Ray (9)
 
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptxA Free 200-Page eBook ~ Brain and Mind Exercise.pptx
A Free 200-Page eBook ~ Brain and Mind Exercise.pptx
 
Accounting for Restricted Grants When and How To Record Properly
Accounting for Restricted Grants  When and How To Record ProperlyAccounting for Restricted Grants  When and How To Record Properly
Accounting for Restricted Grants When and How To Record Properly
 
Pharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brubPharmaceutics Pharmaceuticals best of brub
Pharmaceutics Pharmaceuticals best of brub
 
How to Setup Default Value for a Field in Odoo 17
How to Setup Default Value for a Field in Odoo 17How to Setup Default Value for a Field in Odoo 17
How to Setup Default Value for a Field in Odoo 17
 
Diversity Quiz Prelims by Quiz Club, IIT Kanpur
Diversity Quiz Prelims by Quiz Club, IIT KanpurDiversity Quiz Prelims by Quiz Club, IIT Kanpur
Diversity Quiz Prelims by Quiz Club, IIT Kanpur
 
A Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two HeartsA Visual Guide to 1 Samuel | A Tale of Two Hearts
A Visual Guide to 1 Samuel | A Tale of Two Hearts
 

HTML CSS.pdf

  • 1. INTRODUCTION TO HTML AND CSS A BEGINNER FRIENDLY SESSION Google Developer Students Club Indian Institute Of Information Technology Kota
  • 2. INTRODUCTION HTML BOILER PLATE BASIC TAGS TABLES DIVISION FORM TOPICS TO BE COVERED INTRODUCTION WAYS TO INSERT CSS ANATOMY AND SYNTAX SELECTORS BOX MODEL POSITIONING BASIC PROPERTIES
  • 4. ABOUT HTML HTML means Hyper Text Markup Language. HTML is NOT a programming language, it’s a markup language, which means its purpose is to give structure to the content of the website, not to define an algorithm.
  • 5. HTML BOILER PLATE A boilerplate in HTML is a template you will add at the start of your project. You should add this boilerplate to all of your HTML pages. To install the extension : open in browser Now type html and press enter at html:5. To add a boiler plate in VS Code
  • 6. HTML TAGS HEADING TAG HTML headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading and <h6> defines the least important heading.
  • 7. PARAGRAPH TAG IMAGE TAG The <p> tag defines a paragraph (text block). src - Specifies the path to the image alt - Specifies an alternate text for the image The HTML <img> tag is used to embed an image in a web page. The <img> tag has two required attributes:
  • 8. DIV TAG ANCHOR TAG The <a> HTML element , with its href attribute, creates a hyperlink to web pages, files, email addresses, locations in the same page, or anything else a URL can address. The <div> tag defines a division or a section in an HTML document. The <div> tag is used as a container for HTML elements.
  • 9. ORDERD LISTS 1 2 UNORDERED LISTS An ordered list starts with the <ol> tag. 1 LISTS HTML lists allow web developers to group a set of related items in lists. Each list item starts with the <li> tag. An unordered list starts with the <ul> tag
  • 10. 1 TABLE HTML tables allow web developers to arrange data into rows and columns. <td> <th> <tr> Each table row starts with a <tr> and ends with a </tr> tag. Each table cell is defined by a <td> and a </td> tag which contains the content of the table cell. This is used when you want your cells to be header cells adding a heading to them.
  • 11. <label> <input type="text"> <input type="email"> <input type="checkbox"> <input type="submit"> An HTML form is used to collect user input. The HTML <form> element is used. An <input> element can be displayed in many ways, depending on the type attribute. and more. HTML FORM
  • 13. ABOUT CSS CSS stands for Cascading Style Sheets. It is a style sheet language that is used to describe the look and formatting of a document written in a markup language. CSS is added to HTML pages to format the document according to information in the style sheet. There are three ways to insert CSS in HTML documents.
  • 14. WAYS TO INSERT CSS Inline External Internal
  • 15. ANATOMY AND 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.
  • 16. PROPERTIES Font size Font style Colour Background colour Text alignment Border Margins Padding #town{ background-color:lightgray; color: brown; border: 2px solid darkred; margin: 20px; padding: 20px; }
  • 17. SELECTORS There are several different types of selectors in CSS. The element selector selects the HTML element by name. CSS Element Selector <style> p{ text-align: center; color: blue; } </style> CSS Id Selector The id selector selects the id attribute of an HTML element to select a specific element. An id is always unique within the page so it is chosen to select a single, unique element. <style> #para1 { text-align: center; color: blue; } </style>
  • 18. The class selector selects HTML elements with a specific class attribute. It is used with a period character . followed by the class name. CSS Class Selector CSS Group Selector The grouping selector is used to select all the elements with the same style definitions. Grouping selector is used to minimize the code. Commas are used to separate each selector in grouping. <style> h1, h2, p { text-align: center; color: blue; } </style> <style> .para1{ text-align: center; color: blue; } </style>
  • 19. BOX MODEL: The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content.
  • 20. POSITIONING IN CSS Fixed The position property specifies the type of positioning method used for an element. Absolute Relative Static
  • 21. COMMENTS Z-INDEX The comment tag is used to insert comments in the source code. Comments are not displayed in the browsers. The z-index property specifies the stack order of an element. We may use z-index:-1 if we want the element to be present at the backward position. <!--This is a comment. Comments are not displayed in the browser--> img { position:absolute; z-index: -1; }