SlideShare uma empresa Scribd logo
1 de 29
HTML Colors
HTML Colors
RGB (Red, Green, Blue)
With HTML, RGB color values can be specified using this formula: rgb(red, green, blue)
Each parameter (red, green, and blue) defines the intensity of the color between 0 and 255.
For example, rgb(255,0,0) is displayed as red, because red is set to its highest value (255) and the others are
set to 0. Experiment by mixing the RGB values below:
HTML Colors
Hexadecimal Colors
With HTML, RGB values can also be specified using hexadecimal color values in the form: #RRGGBB, where RR
(red), GG (green) and BB (blue) are hexadecimal values between 00 and FF (same as decimal 0-255).
For example, #FF0000 is displayed as red, because red is set to its highest value (FF) and the others are set to
the lowest value (00).
HTML Colors
HTML Links
HTML Links
The target attribute specifies where to open the linked document.
This example will open the linked document in a new browser window or in a new tab:
HTML Links - The target Attribute
HTML Links
HTML Links - Image as Link
<a href="default.asp">
<img src="smiley.gif" alt="HTML tutorial" style="width:42px;height:42px;border:0">
</a>3
HTML Links
HTML Links - Create a Bookmark
<h2 id="tips">Useful Tips Section</h2>
<a href="#tips">Visit the Useful Tips Section</a>
<a href="html_tips.html#tips">Visit the Useful Tips Section</a>
HTML Links
Summary
Use the HTML <a> element to define a link
Use the HTML href attribute to define the link address
Use the HTML target attribute to define where to open the linked document
Use the HTML <img> element (inside <a>) to use an image as a link
Use the HTML id attribute (id="value") to define bookmarks in a page
Use the HTML href attribute (href="#value") to link to the bookmark
HTML Links
HTML Images
Image
<img src="html5.gif" alt="HTML5 Icon" width="128" height="128">
Images in another folder
<img src="/images/html5.gif" alt="HTML5 Icon" style="width:128px;height:128px;">
Images in another server1
<img src="http://www.w3schools.com/images/w3schools_green.jpg" alt="W3Schools.com">
HTML Images
???
Can you use an image as a link?
HTML Images
Image Maps
<img src="planets.gif" alt="Planets" usemap="#planetmap"
style="width:145px;height:126px;">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm">
<area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm">
<area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>
HTML Images
Summary
Use the HTML <img> element to define an image
Use the HTML src attribute to define the URL of the image
Use the HTML alt attribute to define an alternate text for an image, if it cannot be displayed
Use the HTML width and height attributes to define the size of the image
Use the CSS width and height properties to define the size of the image (alternatively)
Use the CSS float property to let the image float
Use the HTML <map> element to define an image-map
Use the HTML <area> element to define the clickable areas in the image-map
Use the HTML <img>'s element usemap attribute to point to an image-map
HTML Tables
Basic Syntax
<table>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
Table Cells that Span Many Columns
<table style="width:100%">
<tr>
<th>Name</th>
<th colspan="2">Telephone</th>
</tr>
<tr>
<td>Bill Gates</td>
<td>555 77 854</td>
<td>555 77 855</td>
</tr>
</table>
Table Cells that Span Many Rows
<table style="width:100%">
<tr>
<th>Name:</th>
<td>Bill Gates</td>
</tr>
<tr>
<th rowspan="2">Telephone:</th>
<td>555 77 854</td>
</tr>
<tr>
<td>555 77 855</td>
</tr>
</table>
Summary
Use the HTML <table> element to define a table
Use the HTML <tr> element to define a table row
Use the HTML <td> element to define a table data
Use the HTML <th> element to define a table heading
Use the HTML <caption> element to define a table caption
Use the CSS border property to define a border
Use the CSS border-collapse property to collapse cell borders
Use the CSS padding property to add padding to cells
Use the CSS text-align property to align cell text
Use the CSS border-spacing property to set the spacing between cells
Use the colspan attribute to make a cell span many columns
Use the rowspan attribute to make a cell span many rows
Use the id attribute to uniquely define one table
HTML Lists
Unordered and Ordered Lists
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
Nested list
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
Summary
Use the HTML <ul> element to define an unordered list
Use the HTML style attribute to define the bullet style
Use the HTML <ol> element to define an ordered list
Use the HTML type attribute to define the numbering type
Use the HTML <li> element to define a list item
Lists can be nested inside lists
List items can contain other HTML elements
HTML Block and Inline Elements
Block-level Elements
<div>
<h1> - <h6>
<p>
<form>
Inline Elements
An inline element does not start on a new line and only takes up as much width as necessary.
This is an inline <span> element inside a paragraph.
Examples of inline elements:
<span>
<a>
<img>
The <div> Element
<div style="background-color:black; color:white; padding:20px;">
<h2>London</h2>
<p>London is the capital city of England. It is the most populous city in the United
Kingdom, with a metropolitan area of over 13 million inhabitants.</p>
</div>
The <span> Element
<h1>My <span style="color:red">Important</span> Heading</h1>

Mais conteúdo relacionado

Mais procurados

Mais procurados (6)

uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
Css Introduction
Css IntroductionCss Introduction
Css Introduction
 
Html 5 Tags - Beginners
Html 5  Tags - BeginnersHtml 5  Tags - Beginners
Html 5 Tags - Beginners
 
Css starting
Css startingCss starting
Css starting
 
Html training slide
Html training slideHtml training slide
Html training slide
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 

Destaque

Rubbens cubomatic bakwanden nl-en-fr
Rubbens cubomatic bakwanden nl-en-fr Rubbens cubomatic bakwanden nl-en-fr
Rubbens cubomatic bakwanden nl-en-fr Rubbens grootkeukens
 
MCSE Server Inftrastructure - MS
MCSE Server Inftrastructure - MSMCSE Server Inftrastructure - MS
MCSE Server Inftrastructure - MSLubabalo Manzi
 
Boletín 121002
Boletín 121002Boletín 121002
Boletín 121002Isabel Tc
 
창발 업사이클링 14115340 전선영
창발 업사이클링 14115340 전선영창발 업사이클링 14115340 전선영
창발 업사이클링 14115340 전선영jsy1012
 
Basic_computerHygiene
Basic_computerHygieneBasic_computerHygiene
Basic_computerHygieneEricK Gasana
 
Do Prolargentsize sex pills work?
Do Prolargentsize sex pills work?Do Prolargentsize sex pills work?
Do Prolargentsize sex pills work?toldd3
 
Texto 4 historia (corregido)
Texto 4 historia (corregido)Texto 4 historia (corregido)
Texto 4 historia (corregido)Manuel Lavado
 
Documentación del Sistemas de Gestión de la Calidad
Documentación del Sistemas de Gestión de la Calidad Documentación del Sistemas de Gestión de la Calidad
Documentación del Sistemas de Gestión de la Calidad Jose Sánchez Meza
 
Strategic Content Framework
Strategic Content FrameworkStrategic Content Framework
Strategic Content FrameworkRob Bertholf
 
AND GLOBAL Catelouge
AND GLOBAL CatelougeAND GLOBAL Catelouge
AND GLOBAL CatelougeNILESH SAVLA
 
Date security introduction
Date security   introductionDate security   introduction
Date security introductionLeo Mark Villar
 
Sesion 6 resiliencia
Sesion 6 resilienciaSesion 6 resiliencia
Sesion 6 resilienciaLNolbert
 

Destaque (17)

Rubbens cubomatic bakwanden nl-en-fr
Rubbens cubomatic bakwanden nl-en-fr Rubbens cubomatic bakwanden nl-en-fr
Rubbens cubomatic bakwanden nl-en-fr
 
MCSE Server Inftrastructure - MS
MCSE Server Inftrastructure - MSMCSE Server Inftrastructure - MS
MCSE Server Inftrastructure - MS
 
Bridging-the-gap-Final-Web
Bridging-the-gap-Final-WebBridging-the-gap-Final-Web
Bridging-the-gap-Final-Web
 
Comp
CompComp
Comp
 
Boletín 121002
Boletín 121002Boletín 121002
Boletín 121002
 
창발 업사이클링 14115340 전선영
창발 업사이클링 14115340 전선영창발 업사이클링 14115340 전선영
창발 업사이클링 14115340 전선영
 
Curso responsable de calidad
Curso responsable de calidadCurso responsable de calidad
Curso responsable de calidad
 
Basic_computerHygiene
Basic_computerHygieneBasic_computerHygiene
Basic_computerHygiene
 
Do Prolargentsize sex pills work?
Do Prolargentsize sex pills work?Do Prolargentsize sex pills work?
Do Prolargentsize sex pills work?
 
Texto 4 historia (corregido)
Texto 4 historia (corregido)Texto 4 historia (corregido)
Texto 4 historia (corregido)
 
Documentación del Sistemas de Gestión de la Calidad
Documentación del Sistemas de Gestión de la Calidad Documentación del Sistemas de Gestión de la Calidad
Documentación del Sistemas de Gestión de la Calidad
 
Strategic Content Framework
Strategic Content FrameworkStrategic Content Framework
Strategic Content Framework
 
AND GLOBAL Catelouge
AND GLOBAL CatelougeAND GLOBAL Catelouge
AND GLOBAL Catelouge
 
Proyecto de vida segundo
Proyecto de vida segundoProyecto de vida segundo
Proyecto de vida segundo
 
Date security introduction
Date security   introductionDate security   introduction
Date security introduction
 
Th true milk presentation
Th true milk presentationTh true milk presentation
Th true milk presentation
 
Sesion 6 resiliencia
Sesion 6 resilienciaSesion 6 resiliencia
Sesion 6 resiliencia
 

Semelhante a Html (20)

Web Development 3 (HTML & CSS)
Web Development 3  (HTML & CSS)Web Development 3  (HTML & CSS)
Web Development 3 (HTML & CSS)
 
Html 2
Html   2Html   2
Html 2
 
Web day01 MOL.pdf
Web day01 MOL.pdfWeb day01 MOL.pdf
Web day01 MOL.pdf
 
Html
HtmlHtml
Html
 
Html starting
Html startingHtml starting
Html starting
 
HTML Tutorials
HTML TutorialsHTML Tutorials
HTML Tutorials
 
Web - CSS 1.pptx
Web - CSS 1.pptxWeb - CSS 1.pptx
Web - CSS 1.pptx
 
Workshop 2 Slides.pptx
Workshop 2 Slides.pptxWorkshop 2 Slides.pptx
Workshop 2 Slides.pptx
 
Introduction to css by programmerblog.net
Introduction to css by programmerblog.netIntroduction to css by programmerblog.net
Introduction to css by programmerblog.net
 
HTML Link - Image - Comments
HTML  Link - Image - CommentsHTML  Link - Image - Comments
HTML Link - Image - Comments
 
CSS - Basics
CSS - BasicsCSS - Basics
CSS - Basics
 
Web Development 2 (HTML & CSS)
Web Development 2 (HTML & CSS)Web Development 2 (HTML & CSS)
Web Development 2 (HTML & CSS)
 
Web.pdf
Web.pdfWeb.pdf
Web.pdf
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
List and Links.pptx
List and Links.pptxList and Links.pptx
List and Links.pptx
 
PHP HTML CSS Notes
PHP HTML CSS  NotesPHP HTML CSS  Notes
PHP HTML CSS Notes
 
CSS Foundations, pt 1
CSS Foundations, pt 1CSS Foundations, pt 1
CSS Foundations, pt 1
 
Html
HtmlHtml
Html
 
Html
HtmlHtml
Html
 
CSS tutorial chapter 1
CSS tutorial chapter 1CSS tutorial chapter 1
CSS tutorial chapter 1
 

Mais de Leo Mark Villar

Date security identifcation and authentication
Date security   identifcation and authenticationDate security   identifcation and authentication
Date security identifcation and authenticationLeo Mark Villar
 
Date security security principles
Date security   security principlesDate security   security principles
Date security security principlesLeo Mark Villar
 
Data security authorization and access control
Data security  authorization and access controlData security  authorization and access control
Data security authorization and access controlLeo Mark Villar
 
Data security auditing and accountability
Data security   auditing and accountabilityData security   auditing and accountability
Data security auditing and accountabilityLeo Mark Villar
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2Leo Mark Villar
 
Computer fundamentals-internet p1
Computer fundamentals-internet p1Computer fundamentals-internet p1
Computer fundamentals-internet p1Leo Mark Villar
 

Mais de Leo Mark Villar (11)

Date security identifcation and authentication
Date security   identifcation and authenticationDate security   identifcation and authentication
Date security identifcation and authentication
 
Date security security principles
Date security   security principlesDate security   security principles
Date security security principles
 
Data security authorization and access control
Data security  authorization and access controlData security  authorization and access control
Data security authorization and access control
 
Data security auditing and accountability
Data security   auditing and accountabilityData security   auditing and accountability
Data security auditing and accountability
 
Web programming
Web programmingWeb programming
Web programming
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2
 
Computer fundamentals-internet p1
Computer fundamentals-internet p1Computer fundamentals-internet p1
Computer fundamentals-internet p1
 
Team foundation server
Team foundation serverTeam foundation server
Team foundation server
 
Microsoft office 2013
Microsoft office 2013Microsoft office 2013
Microsoft office 2013
 
Sql performance tuning
Sql performance tuningSql performance tuning
Sql performance tuning
 
Angular js
Angular jsAngular js
Angular js
 

Último

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
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
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
 
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
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 

Último (20)

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
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
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
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
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
 
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
 
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?
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"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...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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
 

Html

  • 3. RGB (Red, Green, Blue) With HTML, RGB color values can be specified using this formula: rgb(red, green, blue) Each parameter (red, green, and blue) defines the intensity of the color between 0 and 255. For example, rgb(255,0,0) is displayed as red, because red is set to its highest value (255) and the others are set to 0. Experiment by mixing the RGB values below: HTML Colors
  • 4. Hexadecimal Colors With HTML, RGB values can also be specified using hexadecimal color values in the form: #RRGGBB, where RR (red), GG (green) and BB (blue) are hexadecimal values between 00 and FF (same as decimal 0-255). For example, #FF0000 is displayed as red, because red is set to its highest value (FF) and the others are set to the lowest value (00). HTML Colors
  • 7. The target attribute specifies where to open the linked document. This example will open the linked document in a new browser window or in a new tab: HTML Links - The target Attribute HTML Links
  • 8. HTML Links - Image as Link <a href="default.asp"> <img src="smiley.gif" alt="HTML tutorial" style="width:42px;height:42px;border:0"> </a>3 HTML Links
  • 9. HTML Links - Create a Bookmark <h2 id="tips">Useful Tips Section</h2> <a href="#tips">Visit the Useful Tips Section</a> <a href="html_tips.html#tips">Visit the Useful Tips Section</a> HTML Links
  • 10. Summary Use the HTML <a> element to define a link Use the HTML href attribute to define the link address Use the HTML target attribute to define where to open the linked document Use the HTML <img> element (inside <a>) to use an image as a link Use the HTML id attribute (id="value") to define bookmarks in a page Use the HTML href attribute (href="#value") to link to the bookmark HTML Links
  • 12. Image <img src="html5.gif" alt="HTML5 Icon" width="128" height="128"> Images in another folder <img src="/images/html5.gif" alt="HTML5 Icon" style="width:128px;height:128px;"> Images in another server1 <img src="http://www.w3schools.com/images/w3schools_green.jpg" alt="W3Schools.com"> HTML Images
  • 13. ??? Can you use an image as a link? HTML Images
  • 14. Image Maps <img src="planets.gif" alt="Planets" usemap="#planetmap" style="width:145px;height:126px;"> <map name="planetmap"> <area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm"> <area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm"> <area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm"> </map> HTML Images
  • 15. Summary Use the HTML <img> element to define an image Use the HTML src attribute to define the URL of the image Use the HTML alt attribute to define an alternate text for an image, if it cannot be displayed Use the HTML width and height attributes to define the size of the image Use the CSS width and height properties to define the size of the image (alternatively) Use the CSS float property to let the image float Use the HTML <map> element to define an image-map Use the HTML <area> element to define the clickable areas in the image-map Use the HTML <img>'s element usemap attribute to point to an image-map
  • 18. Table Cells that Span Many Columns <table style="width:100%"> <tr> <th>Name</th> <th colspan="2">Telephone</th> </tr> <tr> <td>Bill Gates</td> <td>555 77 854</td> <td>555 77 855</td> </tr> </table>
  • 19. Table Cells that Span Many Rows <table style="width:100%"> <tr> <th>Name:</th> <td>Bill Gates</td> </tr> <tr> <th rowspan="2">Telephone:</th> <td>555 77 854</td> </tr> <tr> <td>555 77 855</td> </tr> </table>
  • 20. Summary Use the HTML <table> element to define a table Use the HTML <tr> element to define a table row Use the HTML <td> element to define a table data Use the HTML <th> element to define a table heading Use the HTML <caption> element to define a table caption Use the CSS border property to define a border Use the CSS border-collapse property to collapse cell borders Use the CSS padding property to add padding to cells Use the CSS text-align property to align cell text Use the CSS border-spacing property to set the spacing between cells Use the colspan attribute to make a cell span many columns Use the rowspan attribute to make a cell span many rows Use the id attribute to uniquely define one table
  • 22. Unordered and Ordered Lists <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> <ol> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol>
  • 24. Summary Use the HTML <ul> element to define an unordered list Use the HTML style attribute to define the bullet style Use the HTML <ol> element to define an ordered list Use the HTML type attribute to define the numbering type Use the HTML <li> element to define a list item Lists can be nested inside lists List items can contain other HTML elements
  • 25. HTML Block and Inline Elements
  • 27. Inline Elements An inline element does not start on a new line and only takes up as much width as necessary. This is an inline <span> element inside a paragraph. Examples of inline elements: <span> <a> <img>
  • 28. The <div> Element <div style="background-color:black; color:white; padding:20px;"> <h2>London</h2> <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p> </div>
  • 29. The <span> Element <h1>My <span style="color:red">Important</span> Heading</h1>

Notas do Editor

  1. TVs and computer screens display colors by combining Red, Green, and Blue light.
  2. The alt attribute specifies an alternate text for an image, if the image cannot be displayed. The alt attribute provides alternative information for an image if a user for some reason cannot view it (because of slow connection, an error in the src attribute, or if the user uses a screen reader). You can use the style attribute to specify the width and height of an image. The values are specified in pixels (use px after the value): Both the width, height, and style attributes are valid in the latest HTML5 standard. We suggest you use the style attribute. It prevents styles sheets from changing the original size of images: