Introduction to HTML5
Introduction to HTML5
Hypertext Markup Language 5
Introduction to HTML5
Hypertext Markup Language 5
What Does HTML5 Mean?
Introduction to HTML5
Hypertext Markup Language 5
What Does HTML5 Mean?
Hypertext Markup Language 5 (HTML5) is a markup language for the structure and presentation of
World Wide Web contents.
HTML5 supports the traditional HTML and XHTML-style syntax and other new features in its mark.
Features of HTML
✓ Learning is very easy (easy to modify).
✓ Adding Links where we can add references.
✓ Display documents on platforms like Mac, Windows, Linux etc.
✓ Adding videos & graphics, making it more attractive.
✓ Case-insensitive language.
HTML5 editors
Simple editor: Notepad
SUBLIME TEXT EDITOR
ATOM
VISUAL STUDIO CODE RECOMMENDED
Structure of an HTML5 file
Structure of an HTML5 file
1
Structure of an HTML5 file
1
2
Structure of an HTML5 file
1
2
3
Structure of an HTML5 file
4
1
2
3
Structure of an HTML5 file
4
5
1
2
3
Structure of an HTML5 file
4
5
6
1
2
3
File and folder structure
Files and Folders
Project (Root) Folder: This is the main folder for the project and contains all other files and
folders. On the web, it's called the root folder.
HTML files: These are all of the files that end with .html
These should be directly in the Project/Root folder and not in any sub folders.
How to create an HTML5 file?
How to create an HTML5 file?
Heading Tags in HTML
• <h1>Heading 1</h1>
• <h3>Heading 3</h3>
• <h5>Heading 5</h5>
• <h2>Heading 2</h2>
• <h4>Heading 4</h4>
• <h6>Heading 6</h6>
HTML5 Quotation and Citation tags
•<b> - Bold text
•<strong> - Important text
•<i> - Italic text
•<em> - Emphasized text
•<mark> - Marked text
•<small> - Smaller text
•<del> - Deleted text
•<ins> - Inserted text
•<sub> - Subscript text
•<sup> - Superscript text
How to style in HTML5?
<font>write any tag</font>
Font tag helps
us give color to
the text
Commenting out code in HTML5
Press ctrl + /
Without comment
With comment
HTML5 attributes
• All HTML elements can have attributes
• Attributes provide additional information about elements
• Attributes are always specified in the start tag
• Attributes usually come in name/value pairs like name="value"
Width , Height &
color
Form attributes Inline CSS
Class and ID
What are anchor tags?
What are anchor tags?
What are anchor tags?
These are hyperlinks
What are paragraph tags?
Paragraph tag syntax
What are paragraph tags?
Paragraph tag syntax
Paragraph tag displayed in
our webpage
What are image tags?
What are image tags?
ATTRIBUTES
What are image tags?
SRC - Specifies the path to the image
ATTRIBUTES
What are image tags?
SRC - Specifies the path to the image ALT - Specifies an alternate text for the
image
ATTRIBUTES
What are table tags?
To create a table in a webpage, we use some specific tags :
▪ <table> tag is used to make a table, with attribute “border” so
that it can make a border of the table.
Table Tags
What are table tags?
To create a table in a webpage, we use some specific tags :
▪ <table> tag is used to make a table, with attribute “border” so
that it can make a border of the table.
▪ <tr> tag is used to specify table row. To define each row, we
first need to write the table row tag.
Table Tags
Row 1
Row 2
Row 3
Col 2 Col 3 Col 4
Col 1
What are table tags?
To create a table in a webpage, we use some specific tags :
▪ <table> tag is used to make a table, with attribute “border” so
that it can make a border of the table.
▪ <tr> tag is used to specify table row. To define each row, we
first need to write the table row tag.
▪ <th> tag stands for table head, which is used to define the
headings of the first row. So, inside the first row <tr>, we use
the <th> tag.
Table Tags
Row 1
Row 2
Row 3
Col 2 Col 3 Col 4
Col 1
What are table tags?
To create a table in a webpage, we use some specific tags :
▪ <table> tag is used to make a table, with attribute “border” so
that it can make a border of the table.
▪ <tr> tag is used to specify table row. To define each row, we
first need to write the table row tag.
▪ <th> tag stands for table head, which is used to define the
headings of the first row. So, inside the first row <tr>, we use
the <th> tag.
▪ <td> tag stands for table data. We will write our cell data using
the td tag.
Table Tags
Row 1
Row 2
Row 3
Col 2 Col 3 Col 4
Col 1
What are break tags?
Break tag
syntax
What are break tags?
Break tag
syntax
Break tag in web page
List Tags
List Tags
List Tags
List Tags
List Tags
List Tags
Block and Inline Elements
• There are two display values: block and inline.
• A block-level element always starts on a new line and takes up the full width available.
• An inline element does not start on a new line, and it only takes up as much width as necessary.
• The <p> element is a block-level and is often used as a container for other HTML elements.
• The <b> element is an inline container used to mark up a part of a text, or a part of a document.
Block and Inline Elements
Block and Inline Elements
Inline Elements
<a>
<abbr>
<acronym>
<b>
<bdo>
<big>
<br>
<button>
<cite>
<code>
<dfn>
<em>
<i>
<img>
<input>
<kbd>
<var>
<label>
<q>
<samp>
<script>
<select>
<small>
<span>
<strong>
<sub>
<sup>
<time>
Block Elements
<hr>
<li>
<main>
<nav>
<ol>
<p>
<pre>
<section>
<table>
<ul>
<video>
<audio>
<fieldset>
<figcaption>
<figure>
<footer>
<form>
<h1>
<h2>
<h3>
<h4>
<h5>
<h6>
<header>
<hgroup>
Form tags
Form tags
Form tags
Form tags
Form tags
Form tags
Procedure for creating HTML forms
Form tags
Procedure for creating HTML forms
Form tags
Procedure for creating HTML forms
Form tags
Procedure for creating HTML forms
Form tags
Procedure for creating HTML forms
Form tags
Procedure for creating HTML forms
Form tags
Procedure for creating HTML forms
Input Types in Form Tags
•<input type=“text">
•<input type=“password">
•<input type=“email">
•<input type=“radio">
•<input type=“date">
•<input type=“datelocal-time">
•<input type="file">
•<input type="hidden">
•<input type="image">
•<input type="month">
•<input type="number">
•<input type="range">
•<input type="reset">
•<input type="search">
•<input type="submit">
•<input type="tel">
•<input type=“button">
<input type="time">
•<input type="url">
•<input type="week">
Form Input Attributes (Read-only, Disabled, Size)
The input read-only attribute specifies that an
input field is read-only.
Form Input Attributes (Read-only, Disabled, Size)
The input read-only attribute specifies that an
input field is read-only.
A disabled input field is unusable and un-clickable
Form Input Attributes (Read-only, Disabled, Size)
The input read-only attribute specifies that an
input field is read-only.
A disabled input field is unusable and un-clickable
The input size attribute specifies the visible width, in
characters, of an input field.
Form Input Attributes (Min & Max, Multiple, Placeholder)
The input min and max attributes specify the
minimum and maximum values for an input field.
The input multiple attribute
specifies that the user is
allowed to enter more than
one value in an input field.
The short hint is displayed in the
input field before the user enters a
value.
Form Input Attributes (Required)
Additional input attributes (Min, max, multiple, and placeholder)
The input min and max attributes specify the
minimum and maximum values for an input field.
Additional input attributes (Min, max, multiple, and placeholder)
The input min and max attributes specify the
minimum and maximum values for an input field.
The input multiple attribute
specifies that the user is
allowed to enter more than
one value in an input field.
Additional input attributes (Min, max, multiple, and placeholder)
The input min and max attributes specify the
minimum and maximum values for an input field.
The input multiple attribute
specifies that the user is
allowed to enter more than
one value in an input field.
The short hint is displayed in the
input field before the user enters a
value.
Input attributes (Required)
Input attributes (Required)
Block and Inline Elements
Inline Elements
<a>
<abbr>
<acronym>
<b>
<bdo>
<big>
<br>
<button>
<cite>
<code>
<dfn>
<em>
<i>
<img>
<input>
<kbd>
<var>
<label>
<q>
<samp>
<script>
<select>
<small>
<span>
<strong>
<sub>
<sup>
<time>
Block Elements
<hr>
<li>
<main>
<nav>
<ol>
<p>
<pre>
<section>
<table>
<ul>
<video>
<audio>
<fieldset>
<figcaption>
<figure>
<footer>
<form>
<h1>
<h2>
<h3>
<h4>
<h5>
<h6>
<header>
<hgroup>
Examining Block and Inline Elements
Inline Elements
<a>
<abbr>
<acronym>
<b>
<bdo>
<big>
<br>
<button>
<cite>
<code>
<dfn>
<em>
<i>
<img>
<input>
<kbd>
<var>
<label>
<q>
<samp>
<script>
<select>
<small>
<span>
<strong>
<sub>
<sup>
<time>
Block Elements
<hr>
<li>
<main>
<nav>
<ol>
<p>
<pre>
<section>
<table>
<ul>
<video>
<audio>
<fieldset>
<figcaption>
<figure>
<footer>
<form>
<h1>
<h2>
<h3>
<h4>
<h5>
<h6>
<header>
<hgroup>
Video Tags
Video Tags
Audio Tags
Audio Tags
CONCLUSION

vtu HTML+Course+Slide cse notes and .pdf

  • 1.
  • 2.
  • 3.
    Introduction to HTML5 HypertextMarkup Language 5 What Does HTML5 Mean?
  • 4.
    Introduction to HTML5 HypertextMarkup Language 5 What Does HTML5 Mean? Hypertext Markup Language 5 (HTML5) is a markup language for the structure and presentation of World Wide Web contents. HTML5 supports the traditional HTML and XHTML-style syntax and other new features in its mark.
  • 5.
    Features of HTML ✓Learning is very easy (easy to modify). ✓ Adding Links where we can add references. ✓ Display documents on platforms like Mac, Windows, Linux etc. ✓ Adding videos & graphics, making it more attractive. ✓ Case-insensitive language.
  • 6.
    HTML5 editors Simple editor:Notepad SUBLIME TEXT EDITOR ATOM VISUAL STUDIO CODE RECOMMENDED
  • 7.
    Structure of anHTML5 file
  • 8.
    Structure of anHTML5 file 1
  • 9.
    Structure of anHTML5 file 1 2
  • 10.
    Structure of anHTML5 file 1 2 3
  • 11.
    Structure of anHTML5 file 4 1 2 3
  • 12.
    Structure of anHTML5 file 4 5 1 2 3
  • 13.
    Structure of anHTML5 file 4 5 6 1 2 3
  • 14.
    File and folderstructure Files and Folders Project (Root) Folder: This is the main folder for the project and contains all other files and folders. On the web, it's called the root folder. HTML files: These are all of the files that end with .html These should be directly in the Project/Root folder and not in any sub folders.
  • 15.
    How to createan HTML5 file?
  • 16.
    How to createan HTML5 file?
  • 17.
    Heading Tags inHTML • <h1>Heading 1</h1> • <h3>Heading 3</h3> • <h5>Heading 5</h5> • <h2>Heading 2</h2> • <h4>Heading 4</h4> • <h6>Heading 6</h6>
  • 18.
    HTML5 Quotation andCitation tags •<b> - Bold text •<strong> - Important text •<i> - Italic text •<em> - Emphasized text •<mark> - Marked text •<small> - Smaller text •<del> - Deleted text •<ins> - Inserted text •<sub> - Subscript text •<sup> - Superscript text
  • 19.
    How to stylein HTML5? <font>write any tag</font> Font tag helps us give color to the text
  • 20.
    Commenting out codein HTML5 Press ctrl + / Without comment With comment
  • 21.
    HTML5 attributes • AllHTML elements can have attributes • Attributes provide additional information about elements • Attributes are always specified in the start tag • Attributes usually come in name/value pairs like name="value" Width , Height & color Form attributes Inline CSS Class and ID
  • 22.
  • 23.
  • 24.
    What are anchortags? These are hyperlinks
  • 25.
    What are paragraphtags? Paragraph tag syntax
  • 26.
    What are paragraphtags? Paragraph tag syntax Paragraph tag displayed in our webpage
  • 27.
  • 28.
    What are imagetags? ATTRIBUTES
  • 29.
    What are imagetags? SRC - Specifies the path to the image ATTRIBUTES
  • 30.
    What are imagetags? SRC - Specifies the path to the image ALT - Specifies an alternate text for the image ATTRIBUTES
  • 31.
    What are tabletags? To create a table in a webpage, we use some specific tags : ▪ <table> tag is used to make a table, with attribute “border” so that it can make a border of the table. Table Tags
  • 32.
    What are tabletags? To create a table in a webpage, we use some specific tags : ▪ <table> tag is used to make a table, with attribute “border” so that it can make a border of the table. ▪ <tr> tag is used to specify table row. To define each row, we first need to write the table row tag. Table Tags Row 1 Row 2 Row 3 Col 2 Col 3 Col 4 Col 1
  • 33.
    What are tabletags? To create a table in a webpage, we use some specific tags : ▪ <table> tag is used to make a table, with attribute “border” so that it can make a border of the table. ▪ <tr> tag is used to specify table row. To define each row, we first need to write the table row tag. ▪ <th> tag stands for table head, which is used to define the headings of the first row. So, inside the first row <tr>, we use the <th> tag. Table Tags Row 1 Row 2 Row 3 Col 2 Col 3 Col 4 Col 1
  • 34.
    What are tabletags? To create a table in a webpage, we use some specific tags : ▪ <table> tag is used to make a table, with attribute “border” so that it can make a border of the table. ▪ <tr> tag is used to specify table row. To define each row, we first need to write the table row tag. ▪ <th> tag stands for table head, which is used to define the headings of the first row. So, inside the first row <tr>, we use the <th> tag. ▪ <td> tag stands for table data. We will write our cell data using the td tag. Table Tags Row 1 Row 2 Row 3 Col 2 Col 3 Col 4 Col 1
  • 35.
    What are breaktags? Break tag syntax
  • 36.
    What are breaktags? Break tag syntax Break tag in web page
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
    Block and InlineElements • There are two display values: block and inline. • A block-level element always starts on a new line and takes up the full width available. • An inline element does not start on a new line, and it only takes up as much width as necessary. • The <p> element is a block-level and is often used as a container for other HTML elements. • The <b> element is an inline container used to mark up a part of a text, or a part of a document.
  • 44.
  • 45.
    Block and InlineElements Inline Elements <a> <abbr> <acronym> <b> <bdo> <big> <br> <button> <cite> <code> <dfn> <em> <i> <img> <input> <kbd> <var> <label> <q> <samp> <script> <select> <small> <span> <strong> <sub> <sup> <time> Block Elements <hr> <li> <main> <nav> <ol> <p> <pre> <section> <table> <ul> <video> <audio> <fieldset> <figcaption> <figure> <footer> <form> <h1> <h2> <h3> <h4> <h5> <h6> <header> <hgroup>
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
    Form tags Procedure forcreating HTML forms
  • 52.
    Form tags Procedure forcreating HTML forms
  • 53.
    Form tags Procedure forcreating HTML forms
  • 54.
    Form tags Procedure forcreating HTML forms
  • 55.
    Form tags Procedure forcreating HTML forms
  • 56.
    Form tags Procedure forcreating HTML forms
  • 57.
    Form tags Procedure forcreating HTML forms
  • 58.
    Input Types inForm Tags •<input type=“text"> •<input type=“password"> •<input type=“email"> •<input type=“radio"> •<input type=“date"> •<input type=“datelocal-time"> •<input type="file"> •<input type="hidden"> •<input type="image"> •<input type="month"> •<input type="number"> •<input type="range"> •<input type="reset"> •<input type="search"> •<input type="submit"> •<input type="tel"> •<input type=“button"> <input type="time"> •<input type="url"> •<input type="week">
  • 59.
    Form Input Attributes(Read-only, Disabled, Size) The input read-only attribute specifies that an input field is read-only.
  • 60.
    Form Input Attributes(Read-only, Disabled, Size) The input read-only attribute specifies that an input field is read-only. A disabled input field is unusable and un-clickable
  • 61.
    Form Input Attributes(Read-only, Disabled, Size) The input read-only attribute specifies that an input field is read-only. A disabled input field is unusable and un-clickable The input size attribute specifies the visible width, in characters, of an input field.
  • 62.
    Form Input Attributes(Min & Max, Multiple, Placeholder) The input min and max attributes specify the minimum and maximum values for an input field. The input multiple attribute specifies that the user is allowed to enter more than one value in an input field. The short hint is displayed in the input field before the user enters a value.
  • 63.
  • 64.
    Additional input attributes(Min, max, multiple, and placeholder) The input min and max attributes specify the minimum and maximum values for an input field.
  • 65.
    Additional input attributes(Min, max, multiple, and placeholder) The input min and max attributes specify the minimum and maximum values for an input field. The input multiple attribute specifies that the user is allowed to enter more than one value in an input field.
  • 66.
    Additional input attributes(Min, max, multiple, and placeholder) The input min and max attributes specify the minimum and maximum values for an input field. The input multiple attribute specifies that the user is allowed to enter more than one value in an input field. The short hint is displayed in the input field before the user enters a value.
  • 67.
  • 68.
  • 69.
    Block and InlineElements Inline Elements <a> <abbr> <acronym> <b> <bdo> <big> <br> <button> <cite> <code> <dfn> <em> <i> <img> <input> <kbd> <var> <label> <q> <samp> <script> <select> <small> <span> <strong> <sub> <sup> <time> Block Elements <hr> <li> <main> <nav> <ol> <p> <pre> <section> <table> <ul> <video> <audio> <fieldset> <figcaption> <figure> <footer> <form> <h1> <h2> <h3> <h4> <h5> <h6> <header> <hgroup>
  • 70.
    Examining Block andInline Elements Inline Elements <a> <abbr> <acronym> <b> <bdo> <big> <br> <button> <cite> <code> <dfn> <em> <i> <img> <input> <kbd> <var> <label> <q> <samp> <script> <select> <small> <span> <strong> <sub> <sup> <time> Block Elements <hr> <li> <main> <nav> <ol> <p> <pre> <section> <table> <ul> <video> <audio> <fieldset> <figcaption> <figure> <footer> <form> <h1> <h2> <h3> <h4> <h5> <h6> <header> <hgroup>
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.