SlideShare uma empresa Scribd logo
1 de 14
iFour Consultancy Basics of HTML and CSS and Web Programming Part 2
HTML 
 HTML is a markup language for describing web documents (web pages). 
 HTML stands for Hyper Text Markup Language 
 A markup language is a set of markup tags 
 HTML documents are described by HTML tags 
 Each HTML tag describes different document content 
 Hypertext markup language is processed by the browser (or some html parser) and 
content is displayed. 
 The language consists of tags opening and closing instructions, like font settings, 
anchors, applets, and forms. 
 The material (data) thus presented is said to be “marked up” using the defined tags. 
 This course won’t cover much html per se. 
http://www.ifour-consultancy.com ASP.NET Software company India
HTML Versions and DOCTYPE 
Version Year 
HTML 1991 
HTML+ 1993 
HTML 2.0 1995 
HTML 3.2 1997 
HTML 4.01 1999 
XHTML 2000 
HTML5 2012 
HTML5 
<!DOCTYPE html> 
HTML 4.01 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN“"http://www.w3.org/TR/html4/loose. 
dtd"> 
XHTML 1.0 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/x 
html1-transitional.dtd"> 
http://www.ifour-consultancy.com ASP.NET Software company India
HTML Attributes 
• HTML elements can have attributes 
• Attributes provide additional information about an element 
• Attributes are always specified in the start tag 
• Attributes come in name/value pairs like: name="value" 
Attribute Description 
alt Specifies an alternative text for an image 
disabled Specifies that an input element should be disabled 
href Specifies the URL (web address) for a link 
id Specifies a unique id for an element 
src Specifies the URL (web address) for an image 
style Specifies an inline CSS style for an element 
title Specifies extra information about an element (displayed as a tool tip) 
value Specifies the value (text content) for an input element. 
http://www.ifour-consultancy.com ASP.NET Software company India
Cascading Style Sheets (CSS) 
 What is style? 
 Style is a list of formatting instructions. 
 A Cascading Style Sheet is a file with a list of formatting instructions. 
 CSS style sheets are the modern way to control the appearance and layout of your 
web pages. 
 4.0 and up Navigator and IE fully support CSS. 
 Are used to control how elements are presented in the Web page 
 Use a different syntax that HTML/XHTML 
 Work with the common visual browsers (Internet Explorer, FireFox, Opera) 
 Used properly, can great simplify visual design, site management and content 
maintenance 
http://www.ifour-consultancy.com ASP.NET Software company India
CSS Type 
CSS styling can be added to HTML elements the following 3 ways: 
 Inline - using the style attribute in HTML elements 
 Internal - using the <style> element in the <head> section 
 External - using external CSS files 
Inline Styles 
 Inline styling is useful for applying a unique style to a single HTML element: 
 Inline styling uses the style attribute. 
 This line styling changes the text color and the left margin of single paragraph: 
 Example 
 <p style="color:green;margin-left:20px;">This is a paragraph.</p> 
http://www.ifour-consultancy.com ASP.NET Software company India
External CSS Example 
External style sheet are ideal when 
the style is applied to many pages. 
With external style sheets, you can 
change the look of an entire site by 
changing one file. 
External styles are defined in 
the <head> section of an HTML 
page, in the <link> element 
http://www.ifour-consultancy.com ASP.NET Software company India
<!DOCTYPE html> 
<html> 
<head> 
<style> 
body {background-color:lightgrey} 
h1 {color:blue} 
p {color:green} 
</style> 
</head> 
<body> 
<h1>This is a heading</h1> 
<p>This is a paragraph.</p> 
</body> 
</html> 
Internal CSS Example 
An internal style sheet can be used to define a 
common style for all HTML elements on a page. 
Internal styles are defined in the <head> section 
of an HTML page, in the <style> element: 
http://www.ifour-consultancy.com ASP.NET Software company India
CSS Selector 
 CSS selectors allow you to select and manipulate HTML element(s). 
 CSS selectors are used to "find" (or select) HTML elements based on their id, 
classes, types, attributes, values of attributes and much more. 
The element Selector 
 The element selector selects elements based on the element name. 
 You can select all <p> elements on a page like this: (all <p> elements will be center-aligned, 
with a red text color) 
p { 
text-align: center; 
color: red; 
} 
http://www.ifour-consultancy.com ASP.NET Software company India
The id Selector 
 The id selector uses the id attribute of an HTML tag to find the specific element. 
 An id should be unique within a page, so you should use the id selector when you want to 
find a single, unique element. 
 To find an element with a specific id, write a hash character, followed by the id of the 
element. 
 The style rule below will be applied to the HTML element with id="para1": 
#para1 { 
text-align: center; 
color: red; 
} 
http://www.ifour-consultancy.com ASP.NET Software company India
Comparing HTML Code to CSS Code 
http://www.ifour-consultancy.com ASP.NET Software company India
The class Selector 
 The class selector finds elements with the specific class. 
 The class selector uses the HTML class attribute. 
 To find elements with a specific class, write a period character, followed by the name of 
the class: 
 In the example below, all HTML elements with class="center" will be center-aligned: 
.center { 
text-align: center; 
color: red; 
} 
http://www.ifour-consultancy.com ASP.NET Software company India
Summery 
 HTML is a language to create Web documents. It is superceded by XHTML, but will continue to work in 
browsers for a few years. HTML tags provide structure for text or other information in a document. 
 There are 216 Web-safe colours. While you can use 16million colours, if a user’s monitor cannot display that 
colour, their computer will ‘dither’ to the nearest colour. To anticipate this, use the Web-safe palette or 
adaptive dither. 
 There are four ways to encode style information in HTML documents: 
 The HTML Styles method if you don’t use CSS. 
 Top-of-the-page styles 
 The linked CSS document 
 Inline styles 
http://www.ifour-consultancy.com ASP.NET Software company India
References 
W3schools.com 
Google.co.in 
W3.org 
http://www.ifour-consultancy.com ASP.NET Software company India

Mais conteúdo relacionado

Último

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 

Último (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 

Destaque

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Destaque (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

Basics of html and css and web programming part 2

  • 1. iFour Consultancy Basics of HTML and CSS and Web Programming Part 2
  • 2. HTML  HTML is a markup language for describing web documents (web pages).  HTML stands for Hyper Text Markup Language  A markup language is a set of markup tags  HTML documents are described by HTML tags  Each HTML tag describes different document content  Hypertext markup language is processed by the browser (or some html parser) and content is displayed.  The language consists of tags opening and closing instructions, like font settings, anchors, applets, and forms.  The material (data) thus presented is said to be “marked up” using the defined tags.  This course won’t cover much html per se. http://www.ifour-consultancy.com ASP.NET Software company India
  • 3. HTML Versions and DOCTYPE Version Year HTML 1991 HTML+ 1993 HTML 2.0 1995 HTML 3.2 1997 HTML 4.01 1999 XHTML 2000 HTML5 2012 HTML5 <!DOCTYPE html> HTML 4.01 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN“"http://www.w3.org/TR/html4/loose. dtd"> XHTML 1.0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/x html1-transitional.dtd"> http://www.ifour-consultancy.com ASP.NET Software company India
  • 4. HTML Attributes • HTML elements can have attributes • Attributes provide additional information about an element • Attributes are always specified in the start tag • Attributes come in name/value pairs like: name="value" Attribute Description alt Specifies an alternative text for an image disabled Specifies that an input element should be disabled href Specifies the URL (web address) for a link id Specifies a unique id for an element src Specifies the URL (web address) for an image style Specifies an inline CSS style for an element title Specifies extra information about an element (displayed as a tool tip) value Specifies the value (text content) for an input element. http://www.ifour-consultancy.com ASP.NET Software company India
  • 5. Cascading Style Sheets (CSS)  What is style?  Style is a list of formatting instructions.  A Cascading Style Sheet is a file with a list of formatting instructions.  CSS style sheets are the modern way to control the appearance and layout of your web pages.  4.0 and up Navigator and IE fully support CSS.  Are used to control how elements are presented in the Web page  Use a different syntax that HTML/XHTML  Work with the common visual browsers (Internet Explorer, FireFox, Opera)  Used properly, can great simplify visual design, site management and content maintenance http://www.ifour-consultancy.com ASP.NET Software company India
  • 6. CSS Type CSS styling can be added to HTML elements the following 3 ways:  Inline - using the style attribute in HTML elements  Internal - using the <style> element in the <head> section  External - using external CSS files Inline Styles  Inline styling is useful for applying a unique style to a single HTML element:  Inline styling uses the style attribute.  This line styling changes the text color and the left margin of single paragraph:  Example  <p style="color:green;margin-left:20px;">This is a paragraph.</p> http://www.ifour-consultancy.com ASP.NET Software company India
  • 7. External CSS Example External style sheet are ideal when the style is applied to many pages. With external style sheets, you can change the look of an entire site by changing one file. External styles are defined in the <head> section of an HTML page, in the <link> element http://www.ifour-consultancy.com ASP.NET Software company India
  • 8. <!DOCTYPE html> <html> <head> <style> body {background-color:lightgrey} h1 {color:blue} p {color:green} </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> Internal CSS Example An internal style sheet can be used to define a common style for all HTML elements on a page. Internal styles are defined in the <head> section of an HTML page, in the <style> element: http://www.ifour-consultancy.com ASP.NET Software company India
  • 9. CSS Selector  CSS selectors allow you to select and manipulate HTML element(s).  CSS selectors are used to "find" (or select) HTML elements based on their id, classes, types, attributes, values of attributes and much more. The element Selector  The element selector selects elements based on the element name.  You can select all <p> elements on a page like this: (all <p> elements will be center-aligned, with a red text color) p { text-align: center; color: red; } http://www.ifour-consultancy.com ASP.NET Software company India
  • 10. The id Selector  The id selector uses the id attribute of an HTML tag to find the specific element.  An id should be unique within a page, so you should use the id selector when you want to find a single, unique element.  To find an element with a specific id, write a hash character, followed by the id of the element.  The style rule below will be applied to the HTML element with id="para1": #para1 { text-align: center; color: red; } http://www.ifour-consultancy.com ASP.NET Software company India
  • 11. Comparing HTML Code to CSS Code http://www.ifour-consultancy.com ASP.NET Software company India
  • 12. The class Selector  The class selector finds elements with the specific class.  The class selector uses the HTML class attribute.  To find elements with a specific class, write a period character, followed by the name of the class:  In the example below, all HTML elements with class="center" will be center-aligned: .center { text-align: center; color: red; } http://www.ifour-consultancy.com ASP.NET Software company India
  • 13. Summery  HTML is a language to create Web documents. It is superceded by XHTML, but will continue to work in browsers for a few years. HTML tags provide structure for text or other information in a document.  There are 216 Web-safe colours. While you can use 16million colours, if a user’s monitor cannot display that colour, their computer will ‘dither’ to the nearest colour. To anticipate this, use the Web-safe palette or adaptive dither.  There are four ways to encode style information in HTML documents:  The HTML Styles method if you don’t use CSS.  Top-of-the-page styles  The linked CSS document  Inline styles http://www.ifour-consultancy.com ASP.NET Software company India
  • 14. References W3schools.com Google.co.in W3.org http://www.ifour-consultancy.com ASP.NET Software company India

Notas do Editor

  1. ASP.NET software company in india
  2. ASP.NET software company in india
  3. ASP.NET software company in india
  4. ASP.NET software company in india
  5. ASP.NET software company in india
  6. ASP.NET software company in india
  7. ASP.NET software company in india
  8. ASP.NET software company in india
  9. ASP.NET software company in india
  10. ASP.NET software company in india
  11. ASP.NET software company in india
  12. ASP.NET software company in india
  13. ASP.NET software company in india
  14. ASP.NET software company in india