SlideShare a Scribd company logo
1 of 21
Html lists
 Unordered List—
<!DOCTYPE html>
<html>
<body>
<h2>An unordered HTML list</h2>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>
 Unordered List:
 Disc
 Circle
 Square
 None
Example:
<ul style="list-style-type:disc">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Ordered list
 type="1“
 type="A“
 type="a“
 type="I“
 type="i"
 <ol type="1">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
Nested HTML Lists
 List can be nested (lists inside lists):
 Example
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
HTML Block and Inline
Elements
Block-level Elements
A block-level element always starts on a new
line and takes up the full width available
(stretches out to the left and right as far as it
can).
The <div></div> element is a block-level
element.
Examples of block-level elements:
<div>
<h1> - <h6>
<p>
<form>
</div>
 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
 The <div> element is often used as a container for other HTML elements.
 The <div> element has no required attributes, but both style and class are
common.
 When used together with CSS, the <div> element can be used to style
blocks of content:
 Example
<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
 The <span> element is often used as a
container for some text.
 The <span> element has no required
attributes, but both style and class are
common.
 When used together with CSS, the
<span> element can be used to style
parts of the text:
 Example
 <h1>My <span
style="color:red">Important</span>
Heading</h1>
HTML Grouping Tags
 <div>
 <span>
<div> Defines a section in a document
(block-level)
<span> Defines a section in a
document (inline)
<div> example
<!DOCTYPE html>
<html>
<body>
<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>
<p>Standing on the River Thames, London has been a major
settlement for two millennia, its history going back to its founding by
the Romans, who named it Londinium.</p>
</div>
</body>
</html>
HTML Iframes
 <!DOCTYPE html>
 <html>
 <body>
 <iframe src="demo_iframe.htm"
height="200" width="300"></iframe>
 </body>
 </html>
HTML Encoding (Character
Sets)
 To display an HTML page correctly, a web browser must know which character set (character encoding)
to use.
 What is Character Encoding?
 ASCII was the first character encoding standard (also called character set). ASCII defined 127
different alphanumeric characters that could be used on the internet: numbers (0-9), English letters (A-
Z), and some special characters like ! $ + - ( ) @ < > .
 ANSI (Windows-1252) was the original Windows character set, with support for 256 different character
codes.
 ISO-8859-1 was the default character set for HTML 4. This character set also supported 256 different
character codes.
 Because ANSI and ISO-8859-1 were so limited, the default character encoding was changed to UTF-8 in
HTML5.
 UTF-8 (Unicode) covers almost all of the characters and symbols in the world.
 All HTML 4 processors also support UTF-8 encoding.
 The HTML charset Attribute
 To display an HTML page correctly, a web browser must know the character set used in the page.
 This is specified in the <meta> tag:
 For HTML4:
 <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
 For HTML5:
 <meta charset="UTF-8">
Html video
 How it Works
 The controls attribute adds video controls,
like play, pause, and volume.
 It is a good idea to always include width and
height attributes. If height and width are not
set, the page might flicker while the video
loads.
 The <source> element allows you to specify
alternative video files which the browser may
choose from. The browser will use the first
recognized format.
 The text between the <video> and </video>
tags will only be displayed in browsers that
do not support the <video> element.
Playing Videos in HTML
Before HTML5, a video could only be played in a browser with a plug-in
(like flash).
The HTML5 <video> element specifies a standard way to embed a
video in a web page.
 To start a video automatically use the
autoplay attribute:
 Example
 <video width="320" height="240" autoplay>
<source src="movie.mp4"
type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
** The autoplay attribute does not work in
mobile devices like iPad and iPhone.
Audio on the Web
 Before HTML5, audio files could only be played in a browser with a
plug-in (like flash).
 The HTML5 <audio> element specifies a standard way to embed
audio in a web page.
 HTML Audio - How It Works
 The controls attribute adds audio controls, like play, pause, and
volume.
 The <source> element allows you to specify alternative audio files
which the browser may choose from. The browser will use the first
recognized format.
 The text between the <audio> and </audio> tags will only be
displayed in browsers that do not support the <audio> element.
 HTML Audio - Browser Support
 In HTML5, there are 3 supported audio formats: MP3, Wav, and
Ogg.
HTML Forms
The <form> Element
 The HTML <form> element defines a form
that is used to collect user input:
<form>
.
form elements
.
</form>
 An HTML form contains form elements.
 Form elements are different types of input
elements, like text fields, checkboxes, radio
buttons, submit buttons, and more.
The <input> Element
<input type="text">
<input type="radio">
<input type="submit">
<form>
First name:<br>
<input type="text"
name="firstname"><br>
Last name:<br>
<input type="text" name="lastname">
</form>
Form
 Note that the form itself is not
visible.</p>
 Also note that the default width of a
text input field is 20 characters.
Radio Button Input
<form>
<input type="radio" name="gender"
value="male" checked> Male<br>
<input type="radio" name="gender"
value="female"> Female<br>
<input type="radio" name="gender"
value="other"> Other
</form>
The Submit Button
 <input type="submit">
 defines a button for submitting the
form data to a form-handler.
 The form-handler is typically a server
page with a script for processing input
data.
 The form-handler is specified in the
form's action attribute:
Submit
<form action="action_page.php">
First name:<br>
<input type="text" name="firstname"
value="Mickey"><br>
Last name:<br>
<input type="text" name="lastname"
value="Mouse"><br><br>
<input type="submit"
value="Submit">
</form>
Grouping Form Data with
<fieldset>
The <fieldset> element is used to
group related data in a form.
The <legend> element defines a
caption for the <fieldset> element.
<form action="action_page.php">
<fieldset>
<legend>Personal
information:</legend>
First name:<br>
<input type="text" name="firstname"
value="Mickey"><br>
Last name:<br>
<input type="text" name="lastname"
value="Mouse"><br><br>
<input type="submit" value="Submit">
</fieldset>
</form>

More Related Content

What's hot (20)

3. tutorial html web desain
3. tutorial html web desain3. tutorial html web desain
3. tutorial html web desain
 
html tags
 html tags html tags
html tags
 
Intodcution to Html
Intodcution to HtmlIntodcution to Html
Intodcution to Html
 
CSS Comprehensive Overview
CSS Comprehensive OverviewCSS Comprehensive Overview
CSS Comprehensive Overview
 
Web Design Basics
Web Design BasicsWeb Design Basics
Web Design Basics
 
Html notes
Html notesHtml notes
Html notes
 
Basic Details of HTML and CSS.pdf
Basic Details of HTML and CSS.pdfBasic Details of HTML and CSS.pdf
Basic Details of HTML and CSS.pdf
 
INTRODUCTION FOR HTML
INTRODUCTION  FOR HTML INTRODUCTION  FOR HTML
INTRODUCTION FOR HTML
 
Web development using html 5
Web development using html 5Web development using html 5
Web development using html 5
 
HTML Web design english & sinhala mix note
HTML Web design english & sinhala mix noteHTML Web design english & sinhala mix note
HTML Web design english & sinhala mix note
 
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
HtmlHtml
Html
 
HTML Webinar Class
HTML Webinar ClassHTML Webinar Class
HTML Webinar Class
 
HTML 4.0
HTML 4.0HTML 4.0
HTML 4.0
 
HTML basics
HTML basicsHTML basics
HTML basics
 
Web Development Using CSS3
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3
 
Web Development Using CSS3
Web Development Using CSS3Web Development Using CSS3
Web Development Using CSS3
 
Html project report12
Html project report12Html project report12
Html project report12
 
Web development (html)
Web development (html)Web development (html)
Web development (html)
 
Html 1
Html 1Html 1
Html 1
 

Similar to HTML 5 Basics Part Two

Similar to HTML 5 Basics Part Two (20)

Html ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangaloreHtml ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangalore
 
Html
HtmlHtml
Html
 
HTML
HTMLHTML
HTML
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Full Stack Class in Marathahalli| AchieversIT
Full Stack Class in Marathahalli| AchieversITFull Stack Class in Marathahalli| AchieversIT
Full Stack Class in Marathahalli| AchieversIT
 
HTML Notes For demo_classes.pdf
HTML Notes For demo_classes.pdfHTML Notes For demo_classes.pdf
HTML Notes For demo_classes.pdf
 
Html5 css3
Html5 css3Html5 css3
Html5 css3
 
Html
HtmlHtml
Html
 
PPT-203105353-1.pdf
PPT-203105353-1.pdfPPT-203105353-1.pdf
PPT-203105353-1.pdf
 
Unit 2
Unit 2 Unit 2
Unit 2
 
Html tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.comHtml tutorials by www.dmdiploma.com
Html tutorials by www.dmdiploma.com
 
Html 5
Html 5Html 5
Html 5
 
HyperTextMarkupLanguage.ppt
HyperTextMarkupLanguage.pptHyperTextMarkupLanguage.ppt
HyperTextMarkupLanguage.ppt
 
Web design and Development
Web design and DevelopmentWeb design and Development
Web design and Development
 
計算機概論20161205
計算機概論20161205計算機概論20161205
計算機概論20161205
 
Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.ppt
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
HTML Comprehensive Overview
HTML Comprehensive OverviewHTML Comprehensive Overview
HTML Comprehensive Overview
 
HTML.pdf
HTML.pdfHTML.pdf
HTML.pdf
 
Html introduction
Html introductionHtml introduction
Html introduction
 

Recently uploaded

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 

Recently uploaded (20)

Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 

HTML 5 Basics Part Two

  • 1. Html lists  Unordered List— <!DOCTYPE html> <html> <body> <h2>An unordered HTML list</h2> <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> </body> </html>  Unordered List:  Disc  Circle  Square  None Example: <ul style="list-style-type:disc"> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul>
  • 2. Ordered list  type="1“  type="A“  type="a“  type="I“  type="i"  <ol type="1"> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol>
  • 3. Nested HTML Lists  List can be nested (lists inside lists):  Example <ul> <li>Coffee</li> <li>Tea <ul> <li>Black tea</li> <li>Green tea</li> </ul> </li> <li>Milk</li> </ul>
  • 4. HTML Block and Inline Elements Block-level Elements A block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can). The <div></div> element is a block-level element. Examples of block-level elements: <div> <h1> - <h6> <p> <form> </div>
  • 5.  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  The <div> element is often used as a container for other HTML elements.  The <div> element has no required attributes, but both style and class are common.  When used together with CSS, the <div> element can be used to style blocks of content:  Example <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>
  • 6. The <span> Element  The <span> element is often used as a container for some text.  The <span> element has no required attributes, but both style and class are common.  When used together with CSS, the <span> element can be used to style parts of the text:  Example  <h1>My <span style="color:red">Important</span> Heading</h1>
  • 7. HTML Grouping Tags  <div>  <span> <div> Defines a section in a document (block-level) <span> Defines a section in a document (inline)
  • 8. <div> example <!DOCTYPE html> <html> <body> <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> <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p> </div> </body> </html>
  • 9. HTML Iframes  <!DOCTYPE html>  <html>  <body>  <iframe src="demo_iframe.htm" height="200" width="300"></iframe>  </body>  </html>
  • 10. HTML Encoding (Character Sets)  To display an HTML page correctly, a web browser must know which character set (character encoding) to use.  What is Character Encoding?  ASCII was the first character encoding standard (also called character set). ASCII defined 127 different alphanumeric characters that could be used on the internet: numbers (0-9), English letters (A- Z), and some special characters like ! $ + - ( ) @ < > .  ANSI (Windows-1252) was the original Windows character set, with support for 256 different character codes.  ISO-8859-1 was the default character set for HTML 4. This character set also supported 256 different character codes.  Because ANSI and ISO-8859-1 were so limited, the default character encoding was changed to UTF-8 in HTML5.  UTF-8 (Unicode) covers almost all of the characters and symbols in the world.  All HTML 4 processors also support UTF-8 encoding.  The HTML charset Attribute  To display an HTML page correctly, a web browser must know the character set used in the page.  This is specified in the <meta> tag:  For HTML4:  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">  For HTML5:  <meta charset="UTF-8">
  • 11. Html video  How it Works  The controls attribute adds video controls, like play, pause, and volume.  It is a good idea to always include width and height attributes. If height and width are not set, the page might flicker while the video loads.  The <source> element allows you to specify alternative video files which the browser may choose from. The browser will use the first recognized format.  The text between the <video> and </video> tags will only be displayed in browsers that do not support the <video> element.
  • 12. Playing Videos in HTML Before HTML5, a video could only be played in a browser with a plug-in (like flash). The HTML5 <video> element specifies a standard way to embed a video in a web page.  To start a video automatically use the autoplay attribute:  Example  <video width="320" height="240" autoplay> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support the video tag. </video> ** The autoplay attribute does not work in mobile devices like iPad and iPhone.
  • 13. Audio on the Web  Before HTML5, audio files could only be played in a browser with a plug-in (like flash).  The HTML5 <audio> element specifies a standard way to embed audio in a web page.  HTML Audio - How It Works  The controls attribute adds audio controls, like play, pause, and volume.  The <source> element allows you to specify alternative audio files which the browser may choose from. The browser will use the first recognized format.  The text between the <audio> and </audio> tags will only be displayed in browsers that do not support the <audio> element.  HTML Audio - Browser Support  In HTML5, there are 3 supported audio formats: MP3, Wav, and Ogg.
  • 14. HTML Forms The <form> Element  The HTML <form> element defines a form that is used to collect user input: <form> . form elements . </form>  An HTML form contains form elements.  Form elements are different types of input elements, like text fields, checkboxes, radio buttons, submit buttons, and more.
  • 15. The <input> Element <input type="text"> <input type="radio"> <input type="submit"> <form> First name:<br> <input type="text" name="firstname"><br> Last name:<br> <input type="text" name="lastname"> </form>
  • 16. Form  Note that the form itself is not visible.</p>  Also note that the default width of a text input field is 20 characters.
  • 17. Radio Button Input <form> <input type="radio" name="gender" value="male" checked> Male<br> <input type="radio" name="gender" value="female"> Female<br> <input type="radio" name="gender" value="other"> Other </form>
  • 18. The Submit Button  <input type="submit">  defines a button for submitting the form data to a form-handler.  The form-handler is typically a server page with a script for processing input data.  The form-handler is specified in the form's action attribute:
  • 19. Submit <form action="action_page.php"> First name:<br> <input type="text" name="firstname" value="Mickey"><br> Last name:<br> <input type="text" name="lastname" value="Mouse"><br><br> <input type="submit" value="Submit"> </form>
  • 20. Grouping Form Data with <fieldset> The <fieldset> element is used to group related data in a form. The <legend> element defines a caption for the <fieldset> element.
  • 21. <form action="action_page.php"> <fieldset> <legend>Personal information:</legend> First name:<br> <input type="text" name="firstname" value="Mickey"><br> Last name:<br> <input type="text" name="lastname" value="Mouse"><br><br> <input type="submit" value="Submit"> </fieldset> </form>