WK 01 HTML Part I
WK 01 HTML Part I
Web Technology
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 1 / 39
Web Technology Syllabus
Syllabus
b Unit 1: HTML5, CSS3 and XML: Introduction to markup language, elements of Html5, controlling of
Form elements, Dynamic graphics (canvas, SVG, etc.), controlling of audio and video elements;
Introduction to CSS, type, elements and their attributes, layout, controlling of motion and colours;
Introduction to XML, Defining XML tags, their attributes and values, Document type definition,
XML Schemas, Document Object model, XHTML, Parsing XML Data (DOM and SAX parsers), UI
framework: Bootstrap 4
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 2 / 39
Web Technology Syllabus
Syllabus
b Unit 1: HTML5, CSS3 and XML: Introduction to markup language, elements of Html5, controlling of
Form elements, Dynamic graphics (canvas, SVG, etc.), controlling of audio and video elements;
Introduction to CSS, type, elements and their attributes, layout, controlling of motion and colours;
Introduction to XML, Defining XML tags, their attributes and values, Document type definition,
XML Schemas, Document Object model, XHTML, Parsing XML Data (DOM and SAX parsers), UI
framework: Bootstrap 4
b Unit 2: Client Side Scripting: Introduction to JavaScript, declaring variables, scope of variables
functions, event handlers, Document Object Model, Form validations.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 2 / 39
Web Technology Syllabus
Syllabus
b Unit 1: HTML5, CSS3 and XML: Introduction to markup language, elements of Html5, controlling of
Form elements, Dynamic graphics (canvas, SVG, etc.), controlling of audio and video elements;
Introduction to CSS, type, elements and their attributes, layout, controlling of motion and colours;
Introduction to XML, Defining XML tags, their attributes and values, Document type definition,
XML Schemas, Document Object model, XHTML, Parsing XML Data (DOM and SAX parsers), UI
framework: Bootstrap 4
b Unit 2: Client Side Scripting: Introduction to JavaScript, declaring variables, scope of variables
functions, event handlers, Document Object Model, Form validations.
b Unit 3: JavaScript Frameworks: ReactJS, AngularJS, VueJS, architectures, Model-view-controller,
virtual DOM. Server Side Scripting using *Stack: Introduction to Node.JS, ExpressJS, MongoDB,
Data Flow in MEAN and MERN stack, architectures, example application;
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 2 / 39
Web Technology Syllabus
Syllabus
b Unit 1: HTML5, CSS3 and XML: Introduction to markup language, elements of Html5, controlling of
Form elements, Dynamic graphics (canvas, SVG, etc.), controlling of audio and video elements;
Introduction to CSS, type, elements and their attributes, layout, controlling of motion and colours;
Introduction to XML, Defining XML tags, their attributes and values, Document type definition,
XML Schemas, Document Object model, XHTML, Parsing XML Data (DOM and SAX parsers), UI
framework: Bootstrap 4
b Unit 2: Client Side Scripting: Introduction to JavaScript, declaring variables, scope of variables
functions, event handlers, Document Object Model, Form validations.
b Unit 3: JavaScript Frameworks: ReactJS, AngularJS, VueJS, architectures, Model-view-controller,
virtual DOM. Server Side Scripting using *Stack: Introduction to Node.JS, ExpressJS, MongoDB,
Data Flow in MEAN and MERN stack, architectures, example application;
b Unit 4: Server Side Scripting using PHP: Introduction to PHP, Declaring variables, data types,
arrays, strings, operations, expressions, control structures, functions, Reading data from web form
controls like Text Boxes, radio buttons, lists etc., Handling File Uploads, Connecting to database
(MySQL/MariaDB as reference), executing simple queries, handling results, Handling sessions and
cookies; File operations like opening, closing, reading, writing, appending, deleting etc. on text and
binary files, listing directories. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 2 / 39
Web Technology Evaluation
b Evaluation
- Assessment 1 : 25 Marks → Unit 1
- Assessment 2 : 25 Marks → Unit 2
- Assessment 3 : 25 Marks → Unit 3 OR (Quiz, Mini project and/or Assignment )
- Assessment 4: End Term : 100 Marks → [30 % from Unit 1 and Unit 2] + [70% from Uni 3 and
Unit 4]
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 3 / 39
Web Technology Evaluation
b Evaluation
- Assessment 1 : 25 Marks → Unit 1
- Assessment 2 : 25 Marks → Unit 2
- Assessment 3 : 25 Marks → Unit 3 OR (Quiz, Mini project and/or Assignment )
- Assessment 4: End Term : 100 Marks → [30 % from Unit 1 and Unit 2] + [70% from Uni 3 and
Unit 4]
- Grading will be based on the total scaled down score (to 50) from Assessment 1, Assessment 2
and Assessment 3 and total scaled down score (to 50) from End term.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 3 / 39
Web Technology Evaluation
b Evaluation
- Assessment 1 : 25 Marks → Unit 1
- Assessment 2 : 25 Marks → Unit 2
- Assessment 3 : 25 Marks → Unit 3 OR (Quiz, Mini project and/or Assignment )
- Assessment 4: End Term : 100 Marks → [30 % from Unit 1 and Unit 2] + [70% from Uni 3 and
Unit 4]
- Grading will be based on the total scaled down score (to 50) from Assessment 1, Assessment 2
and Assessment 3 and total scaled down score (to 50) from End term.
b 100% attendance is mandatory. Regarding medical and other emergency leave need to address to
academic section.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 3 / 39
Web Technology Text book and References
b Matthew MacDonald, Creating a Website - The Missing Manual, 4th ed, 2015, O’Reilly.
b Programming world wide web, R.W. Sebesta. Fourth Edition, Pearson.
b Internet and World Wide Web – How to program, Dietel and Nieto, Pearson
b Greg Lim, Beginning MERN Stack: Build and Deploy a Full Stack MongoDB, Express, React,
Node.js App
b Cris Bates, Web Programming: Building Internet Applications, 3ed, Wiley
b HTML5, CSS3, JavaScript, PHP Tutorials http://www.w3schools.com
b jQuery Tutorial https://learn.jquery.com
b MongoDB Tutorial and Certifications https://university.mongodb.com
b Express https://expressjs.com/en/starter/installing.html
b React Tutorial https://reactjs.org/tutorial/tutorial.html
b Node https://nodeschool.io
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 4 / 39
Introduction to HTML HTML
What is HTML?
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 5 / 39
Introduction to HTML HTML
What is HTML?
What is SGML?
What is Markdown?
A lightweight markup language for creating formatted text using a
plain-text editor ( RFC 7763 introduced MIME type text/markdown).
John Gruber and Aaron Swartz created Markdown in 2004.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 7 / 39
Introduction to HTML Markdown
What is Markdown?
A lightweight markup language for creating formatted text using a
plain-text editor ( RFC 7763 introduced MIME type text/markdown).
John Gruber and Aaron Swartz created Markdown in 2004.
b Lightweight markup language → designed to be simple and easy to use, with a minimal syntax and a
focus on readability
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 7 / 39
Introduction to HTML Markdown
What is Markdown?
A lightweight markup language for creating formatted text using a
plain-text editor ( RFC 7763 introduced MIME type text/markdown).
John Gruber and Aaron Swartz created Markdown in 2004.
b Lightweight markup language → designed to be simple and easy to use, with a minimal syntax and a
focus on readability
b Widely used in blogging, instant messaging, online forums, collaborative software, documentation
pages, and readme files.
b Example of Websites: GitHub, Bitbucket, Reddit, Stack Exchange, OpenStreetMap and SourceForge
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 7 / 39
Introduction to HTML Markdown
What is Markdown?
A lightweight markup language for creating formatted text using a
plain-text editor ( RFC 7763 introduced MIME type text/markdown).
John Gruber and Aaron Swartz created Markdown in 2004.
b Lightweight markup language → designed to be simple and easy to use, with a minimal syntax and a
focus on readability
b Widely used in blogging, instant messaging, online forums, collaborative software, documentation
pages, and readme files.
b Example of Websites: GitHub, Bitbucket, Reddit, Stack Exchange, OpenStreetMap and SourceForge
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 7 / 39
Introduction to HTML RFC
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 8 / 39
Introduction to HTML RFC
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 8 / 39
Introduction to HTML MIME type
b A Standard, used to identify files or content types on the Internet while exchanging files according to
their nature and format.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 9 / 39
Introduction to HTML MIME type
b A Standard, used to identify files or content types on the Internet while exchanging files according to
their nature and format. For example, a file with the extension .txt is typically identified as a plain
text file, while a file with the extension .jpg is typically identified as a JPEG (Joint Photographic
Experts Group) image. This allows the receiving system to properly handle the content, whether it is
a simple text message or a more complex multimedia file.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 9 / 39
Introduction to HTML MIME type
b A Standard, used to identify files or content types on the Internet while exchanging files according to
their nature and format. For example, a file with the extension .txt is typically identified as a plain
text file, while a file with the extension .jpg is typically identified as a JPEG (Joint Photographic
Experts Group) image. This allows the receiving system to properly handle the content, whether it is
a simple text message or a more complex multimedia file.
b MIME-Version: 1.0 declares that the message adheres to the MIME format, allowing email clients
and servers to:
- Interpret various content types beyond plain text.
- Handle attachments, multiple character sets, and non-English text.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 9 / 39
Introduction to HTML MIME type
b A Standard, used to identify files or content types on the Internet while exchanging files according to
their nature and format. For example, a file with the extension .txt is typically identified as a plain
text file, while a file with the extension .jpg is typically identified as a JPEG (Joint Photographic
Experts Group) image. This allows the receiving system to properly handle the content, whether it is
a simple text message or a more complex multimedia file.
b MIME-Version: 1.0 declares that the message adheres to the MIME format, allowing email clients
and servers to:
- Interpret various content types beyond plain text.
- Handle attachments, multiple character sets, and non-English text.
b Media-types comprises of header and body section.
b Header contains information regarding the actual content of body section and comprises of
content-type, Content-disposition, and Content-transfer-encoding
- General Syntax of content-type: type/[tree .] subtype [+suffix]* [; parameter]
- Example: text/html, text/css, application/pdf, image/jpeg
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 9 / 39
Introduction to HTML MIME type
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="........"
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 11 / 39
Introduction to HTML MIME type
b Content-type consists of a type and a subtype with optional suffix and parameter.
- type defines the broad use of the media types such as application, audio, example, image, font,
message, multipart, model, text, and video
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 11 / 39
Introduction to HTML MIME type
b Content-type consists of a type and a subtype with optional suffix and parameter.
- type defines the broad use of the media types such as application, audio, example, image, font,
message, multipart, model, text, and video
- subtype deals with media format registered through IANA (Internet Assigned Numbers
Authority), which are maintained in the form of a tree. For example vnd prefix for vendor, prs
prefix for personal, x prefix for unregistered
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 11 / 39
Introduction to HTML MIME type
b Content-type consists of a type and a subtype with optional suffix and parameter.
- type defines the broad use of the media types such as application, audio, example, image, font,
message, multipart, model, text, and video
- subtype deals with media format registered through IANA (Internet Assigned Numbers
Authority), which are maintained in the form of a tree. For example vnd prefix for vendor, prs
prefix for personal, x prefix for unregistered
b Suffix is an augmentation to the media type definition to additionally specify the underlying
structure of that media type, allowing for generic processing based on that structure and independent
of the exact type’s particular semantics. For example, application/epub+zip, model/x3d+binary,
image/svg+xml, and application/ld+json
b The optional last field Parameter is used to specify encoding schemes used in content, language of the
content etc.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 11 / 39
Introduction to HTML MIME type
b Content-type consists of a type and a subtype with optional suffix and parameter.
- type defines the broad use of the media types such as application, audio, example, image, font,
message, multipart, model, text, and video
- subtype deals with media format registered through IANA (Internet Assigned Numbers
Authority), which are maintained in the form of a tree. For example vnd prefix for vendor, prs
prefix for personal, x prefix for unregistered
b Suffix is an augmentation to the media type definition to additionally specify the underlying
structure of that media type, allowing for generic processing based on that structure and independent
of the exact type’s particular semantics. For example, application/epub+zip, model/x3d+binary,
image/svg+xml, and application/ld+json
b The optional last field Parameter is used to specify encoding schemes used in content, language of the
content etc.
b Types, subtypes, and parameter names are case-insensitive while Parameter values are not
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 11 / 39
Introduction to HTML MIME type
b Content-type consists of a type and a subtype with optional suffix and parameter.
- type defines the broad use of the media types such as application, audio, example, image, font,
message, multipart, model, text, and video
- subtype deals with media format registered through IANA (Internet Assigned Numbers
Authority), which are maintained in the form of a tree. For example vnd prefix for vendor, prs
prefix for personal, x prefix for unregistered
b Suffix is an augmentation to the media type definition to additionally specify the underlying
structure of that media type, allowing for generic processing based on that structure and independent
of the exact type’s particular semantics. For example, application/epub+zip, model/x3d+binary,
image/svg+xml, and application/ld+json
b The optional last field Parameter is used to specify encoding schemes used in content, language of the
content etc.
b Types, subtypes, and parameter names are case-insensitive while Parameter values are not
b Registrations in the standards tree must either be associated with IETF .specifications or registered
. . . . . . . . . . . . . . . . . . .
b Content-disposition indicates how the content should be processed. Primary types are:
- Inline → Indicates that the content should be automatically displayed when the message is
displayed
- Attachment → Indicates that some form of action is required from the user to open it. Content
should not display automatically.
b In addition to the presentation style, the Content-disposition field also provides parameters for
specifying the name of the file, date of creation/modification etc.
b It indicates whether or not a binary-to-text encoding scheme has been used on the top of the
original encoding as specified within the Content-Type. It deals hop-to-hop encoding to transmit
data not the end-to-end encoding
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 13 / 39
Introduction to HTML MIME type
b It indicates whether or not a binary-to-text encoding scheme has been used on the top of the
original encoding as specified within the Content-Type. It deals hop-to-hop encoding to transmit
data not the end-to-end encoding
b In other words this field is used to indicate the type of transformation that has been used in order to
represent the body in an acceptable manner for transport.
b It may have BASE64, QUOTED-PRINTABLE, 8BIT, 7BIT, BINARY, and x-token as value, which are case
insensitive. In absence of this field 7BIT is considered as default.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 13 / 39
Introduction to HTML MIME type
b It indicates whether or not a binary-to-text encoding scheme has been used on the top of the
original encoding as specified within the Content-Type. It deals hop-to-hop encoding to transmit
data not the end-to-end encoding
b In other words this field is used to indicate the type of transformation that has been used in order to
represent the body in an acceptable manner for transport.
b It may have BASE64, QUOTED-PRINTABLE, 8BIT, 7BIT, BINARY, and x-token as value, which are case
insensitive. In absence of this field 7BIT is considered as default.
- The difference between 8bit and the binary is that binary does not require adherence to any
limits on line length or to the SMTP CRLF semantics, while the bit-width tokens do require
such adherence.
- If the body contains data in any bit-width other than 7-bit, the appropriate bit-width
Content-Transfer-Encoding token must be used (e.g., 8bit for unencoded 8 bit wide data). If
the body contains binary data, the binary Content-Transfer-Encoding token must be used.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 13 / 39
Introduction to HTML MIME type
b It indicates whether or not a binary-to-text encoding scheme has been used on the top of the
original encoding as specified within the Content-Type. It deals hop-to-hop encoding to transmit
data not the end-to-end encoding
b In other words this field is used to indicate the type of transformation that has been used in order to
represent the body in an acceptable manner for transport.
b It may have BASE64, QUOTED-PRINTABLE, 8BIT, 7BIT, BINARY, and x-token as value, which are case
insensitive. In absence of this field 7BIT is considered as default.
- The difference between 8bit and the binary is that binary does not require adherence to any
limits on line length or to the SMTP CRLF semantics, while the bit-width tokens do require
such adherence.
- If the body contains data in any bit-width other than 7-bit, the appropriate bit-width
Content-Transfer-Encoding token must be used (e.g., 8bit for unencoded 8 bit wide data). If
the body contains binary data, the binary Content-Transfer-Encoding token must be used.
b However, majority of mail user agents did not follow this rule
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 13 / 39
Introduction to HTML Encoding
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 14 / 39
Introduction to HTML Encoding
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 14 / 39
Introduction to HTML Encoding
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 14 / 39
Introduction to HTML Encoding
Source: https://datatracker.ietf.org/doc/html/rfc4648#section-4
nsaharia@iiitmanipur.ac.in Introduction to HTML
. . . . . . . . . . . . . . . . . .
15 / 39
. .
Introduction to HTML Encoding
Back to *NIX
Location where all the media-types are stored
$sudo cat /etc/mime.types
application/vnd.oasis.opendocument.text odt
application/epub+zip epub
application/x-debian-package deb
audio/mpeg mpga mpega mp2 mp3 m4a
font/otf ttf otf
image/png png
message/rfc822 eml
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 17 / 39
Introduction to HTML Encoding
Back to *NIX
Location where all the media-types are stored
$sudo cat /etc/mime.types
application/vnd.oasis.opendocument.text odt
application/epub+zip epub
application/x-debian-package deb
audio/mpeg mpga mpega mp2 mp3 m4a
font/otf ttf otf
image/png png
message/rfc822 eml
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 17 / 39
Introduction to HTML Encoding
Back to *NIX
Location where all the media-types are stored
$sudo cat /etc/mime.types
application/vnd.oasis.opendocument.text odt
application/epub+zip epub
application/x-debian-package deb
audio/mpeg mpga mpega mp2 mp3 m4a
font/otf ttf otf
image/png png
message/rfc822 eml
Standard organization
IETF → Internet Engineering Task Force → International
standards organization for the Internet and is responsible for
the technical standards that make up the Internet protocol
suite. It was established in 1986.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 18 / 39
Introduction to HTML Standard organization
Standard organization
IETF → Internet Engineering Task Force → International
standards organization for the Internet and is responsible for
the technical standards that make up the Internet protocol
suite. It was established in 1986.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 18 / 39
Introduction to HTML Standard organization
Standard organization
IETF → Internet Engineering Task Force → International
standards organization for the Internet and is responsible for
the technical standards that make up the Internet protocol
suite. It was established in 1986.
World Wide Web is a platform that runs on top of the Internet, which is a
global network of interconnected computer networks. The Web allows users to
access and share information, while the Internet enables the communication
and connection of computers and devices around the world. . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 18 / 39
Introduction to HTML Standard organization
XHTML
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 19 / 39
Introduction to HTML Standard organization
XHTML
b What is XHTML?
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 19 / 39
Introduction to HTML Standard organization
XHTML
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 19 / 39
Introduction to HTML Standard organization
XHTML
b Extensible HyperText Markup Language is an application belongs to XML family, that visualizes
HTML as an XML document, so that HTML documents can readily be viewed, edited, and validated
with standard XML tools.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 19 / 39
Introduction to HTML Standard organization
XHTML
b Extensible HyperText Markup Language is an application belongs to XML family, that visualizes
HTML as an XML document, so that HTML documents can readily be viewed, edited, and validated
with standard XML tools.
b What is XML?
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 19 / 39
Introduction to HTML Standard organization
XHTML
b Extensible HyperText Markup Language is an application belongs to XML family, that visualizes
HTML as an XML document, so that HTML documents can readily be viewed, edited, and validated
with standard XML tools.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 19 / 39
Introduction to HTML Standard organization
XHTML
b Extensible HyperText Markup Language is an application belongs to XML family, that visualizes
HTML as an XML document, so that HTML documents can readily be viewed, edited, and validated
with standard XML tools.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 19 / 39
Introduction to HTML The conflict
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 20 / 39
Introduction to HTML The conflict
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 20 / 39
Introduction to HTML The conflict
HTML5
nsaharia@iiitmanipur.ac.in Introduction to HTML
. . .
20 / 39
. . . . . . . . . . . . . . . . .
Introduction to HTML Web Hypertext Application Technology Working Group
WHATWG
b The WHATWG works on a number of technologies that are fundamental parts of the web platform.
b HTML5 is widely used as a buzzword to refer to modern web technologies, many of which are
developed at the WHATWG.
- Compatibility (@compatstandard): Describes a collection of non-standard and often
vendor-prefixed CSS properties
- Console (@consolelog): Defines APIs for console debugging facilities.
- DOM (@thedomstandard): Defines the core infrastructure used to define the web.
- Encoding (@encodings): Defines how character encodings work on the web.
- Fetch (@fetchstandard): Defines the networking model for resource retrieval on the web.
- File System (@whatfilesystem): Defines infrastructure and an API for file systems.
- Fullscreen API (@fullscreenapi): Defines how web pages can take over a user’s entire screen (at
the user’s request), e.g., for gaming or to watch a video.
- HTML (@htmlstandard): Defines the core markup language for the web, HTML, as well as
numerous APIs
- Infra (@infrastandard): Define the fundamental concepts upon which standards are built.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 21 / 39
Introduction to HTML Web Hypertext Application Technology Working Group
WHATWG
b MIME Sniffing (@mimesniff): Defines algorithms used to determine the type of resources.
b Notifications API (@notifyapi): Provides an API to display notifications to alert users outside the
context of a web page.
b Quirks Mode (@quirksstandard): Describes behaviours in CSS and Selectors that are not yet defined
in the relevant specifications but that are nonetheless widely implemented.
b Storage (@storagestandard): Defines an API for persistent storage and quota estimates, as well as the
platform storage architecture.
b Streams (@streamsstandard): Provides APIs for creating, composing, and consuming streams of data
that map efficiently to low-level I/O primitives.
b Test Utils (@testutils): Defines internal APIs for automating testing of web platform features
implemented in web browsers.
b URL (@urlstandard): Defines the infrastructure around URLs on the web.
b URL Pattern (@urlpatterns): Provides a web platform primitive for matching URLs based on a
convenient pattern syntax.
b Web IDL (@webidl): Defines an interface definition language, Web IDL, that can be used to describe
interfaces that are intended to be implemented in web browsers. . . . . . . . . . . . . . . . . . . . .
Markup Indicator
For content and presentation Markup languages require markup indicator. The markup indicator in HTML
is called tag. They are keywords often enclosed by angle brackets such as <p> (for paragraph), <img> (for
image), <a> (for hyperlink).
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 23 / 39
Introduction to HTML HTML
Markup Indicator
For content and presentation Markup languages require markup indicator. The markup indicator in HTML
is called tag. They are keywords often enclosed by angle brackets such as <p> (for paragraph), <img> (for
image), <a> (for hyperlink).
HTML tags are used to perform the following operations
b Setting-up the layout the documents
b Proving links to other documents for navigation
b Embedding multimedia
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 23 / 39
Introduction to HTML HTML
Markup Indicator
For content and presentation Markup languages require markup indicator. The markup indicator in HTML
is called tag. They are keywords often enclosed by angle brackets such as <p> (for paragraph), <img> (for
image), <a> (for hyperlink).
HTML tags are used to perform the following operations
b Setting-up the layout the documents
b Proving links to other documents for navigation
b Embedding multimedia
The purpose of the markup language is to relieve the content provider from worrying about the actual
appearance of the document. The author merely indicates via markup tags the semantic meaning of the
words and sentences (such as paragraph, heading, emphasis, and strong), and leave it to the browser to
interpret the markups and render the document for display on the screen.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 23 / 39
Introduction to HTML HTML
Markup Indicator
For content and presentation Markup languages require markup indicator. The markup indicator in HTML
is called tag. They are keywords often enclosed by angle brackets such as <p> (for paragraph), <img> (for
image), <a> (for hyperlink).
HTML tags are used to perform the following operations
b Setting-up the layout the documents
b Proving links to other documents for navigation
b Embedding multimedia
The purpose of the markup language is to relieve the content provider from worrying about the actual
appearance of the document. The author merely indicates via markup tags the semantic meaning of the
words and sentences (such as paragraph, heading, emphasis, and strong), and leave it to the browser to
interpret the markups and render the document for display on the screen.
In other words, it allows the separation of content and presentation. The content provider focuses on the
document contents, while the designer concentrates on the view and presentation. Now a days, CSS along
with HTML is used for presentation.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 23 / 39
Structure of HTML document Tag
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 24 / 39
Structure of HTML document Tag
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 24 / 39
Structure of HTML document Tag
The purpose of the markup language is to relieve the content provider from worrying about the actual
appearance of the document. The author merely indicates via markup tags the semantic meaning of the
words and sentences (such as paragraph, heading, emphasis, and strong), and leave it to the browser to
interpret the markups and render the document for display on the screen.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 24 / 39
Structure of HTML document Tag
The purpose of the markup language is to relieve the content provider from worrying about the actual
appearance of the document. The author merely indicates via markup tags the semantic meaning of the
words and sentences (such as paragraph, heading, emphasis, and strong), and leave it to the browser to
interpret the markups and render the document for display on the screen.
In other words, it allows the separation of content and presentation. The content provider focuses on the
document contents, while the designer concentrates on the view and presentation. Now a days, CSS along
with HTML is used for presentation.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 24 / 39
Structure of HTML document Tag
Separation of concerns
b Separation of concerns allows the document to be presented by different user agents according to
their purposes and abilities.
b For example, a user agent can select an appropriate style sheet to present a document by displaying
on a monitor, printing on paper, or to determine speech characteristics in an audio-only user agent.
The structural and semantic functions of the markup remain identical in each case.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 25 / 39
Structure of HTML document Tag
Separation of concerns
b Separation of concerns allows the document to be presented by different user agents according to
their purposes and abilities.
b For example, a user agent can select an appropriate style sheet to present a document by displaying
on a monitor, printing on paper, or to determine speech characteristics in an audio-only user agent.
The structural and semantic functions of the markup remain identical in each case.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 26 / 39
Structure of HTML document Element
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 26 / 39
Structure of HTML document Element
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 26 / 39
Structure of HTML document Element
Primary componant
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Structure of HTML document Element
Primary componant
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Structure of HTML document Element
Primary componant
Opening tag
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Structure of HTML document Element
Primary componant
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Structure of HTML document Element
Primary componant
Content
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Structure of HTML document Element
Primary componant
Attribute Content
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Structure of HTML document Element
Primary componant
Attribute Content
Element
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 27 / 39
Structure of HTML document Element >> Content model >>
Content Categories I
b Metadata content
- Deals with presentation, behaviour of the rest of the content, and relationship with other docs.
- Example: base, link, meta, noscript, script, style, template, title
b Flow content
- Encompasses most elements including heading, sectioning, phrasing, embedding, interactive,
and form-related elements
- Example: a, abbr, kbd, nav, sub, sup, div, output
b Sectioning content
- Used to create section in the underlining document, defining the scope of header, footer and
body content
- Example: article, aside, nav, section, footer, blockquote, fieldset
b Heading content
- Defines the heading of a section
- Example: h1, h2, h3, . . ., h6 . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 28 / 39
Structure of HTML document Element >> Content model >>
Content Categories II
b Phrasing content
- Associated with formatting of nothing or text. Primarily used to marked-up texts
- Example: abbr, label, span, strong, cite, code, data, ins, del
b Embedded content
- Used to imports another resource into the document. Elements that are from namespaces other
than the HTML namespace
- Emphasis is in content not in the metadata
- Example: audio, canvas, embed, img, math, video
b Interactive content
- Objective is to smoothen the user interaction
- Example: button, textarea, select, details, embed, iframe
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 29 / 39
Structure of HTML document Element >> Content model >>
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 30 / 39
Structure of HTML document Element >> Content model >>
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 30 / 39
Structure of HTML document Element >> Content model >>
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 30 / 39
Structure of HTML document Element >> Content model >>
Element type
- Void element→ <area>, <base>, <br>, <col>, <embed>, <hr>, <img>, <input>, <link>, <meta>,
<source>, <track>, <wbr>
- Template elements → <template>
- Raw text elements → <script>, <style>
- Escapable raw text elements → <textarea>, <title>
- Foreign elements→ Elements from the MathML namespace and the SVG namespace.
- Normal elements→ All other html elements.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 31 / 39
Structure of HTML document Element >> Type
Element type
- Void element→ <area>, <base>, <br>, <col>, <embed>, <hr>, <img>, <input>, <link>, <meta>,
<source>, <track>, <wbr>
- Template elements → <template>
- Raw text elements → <script>, <style>
- Escapable raw text elements → <textarea>, <title>
- Foreign elements→ Elements from the MathML namespace and the SVG namespace.
- Normal elements→ All other html elements.
Element vs Tag
b What is tag?
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 32 / 39
Structure of HTML document Element >> Type
Element vs Tag
b What is tag? Mark-up indicator used to separate content, presentation and behaviour.
b Tags are used to delimit the start and end of elements in the markup.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 32 / 39
Structure of HTML document Element >> Type
Element vs Tag
b What is tag? Mark-up indicator used to separate content, presentation and behaviour.
b Tags are used to delimit the start and end of elements in the markup.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 32 / 39
Structure of HTML document Element >> Type
Element vs Tag
b What is tag? Mark-up indicator used to separate content, presentation and behaviour.
b Tags are used to delimit the start and end of elements in the markup.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 32 / 39
Structure of HTML document Element >> Attribute
Attribute
b Attribute: Property of the element/tag. Additional information about an HTML element and is
usually defined with the opening tag of the element
b Attributes are composed of a name and value pair, separated by an equals sign (=). The value is
often enclosed in double or single quotes.
b Attributes have a name and a value. Attribute names must consist of one or more characters other
than controls, U+0020 (space), U+0022 (”), U+0027 (’), U+003E (>), U+002F (/), U+003D (=),
and noncharacters.
b An attributes can be applied to various elements, and different elements support different attributes.
<a href="https://www.abc.in" target="_self">Link to my homepage</a>
Type of attribute
b Boolean attribute
- Attribute that does not require a value that are used to indicate a true or false condition. If a
Boolean attribute is present, its value is considered to be true, and if it is absent, its value is
considered to be false
- Values of the Boolean attribute can either be omitted, set to an empty string, or be the name of
the attribute. All values, including true, false, and ‘xyz’, while invalid, will resolve to true.
- Example: autofocus, inert, checked, disabled, required, reversed, allowfullscreen,
default, loop, autoplay, controls, muted, readonly, multiple, and selected
b Enumerated attribute
- Attribute that can only take one of a predefined set of values.
- The state for such an attribute is derived by combining the attribute’s value, a set of
keyword/state mappings given in the specification of each attribute
- Example: type attribute of <input> element, target attribute of <a> element
b Global attribute
- Attributes that can be set on any HTML element.
- While these can all, in theory, be added to any HTML element, some global attributes have no
effect when set on some elements; for example, setting hidden on a .<meta> as meta content
. . . . . . . . . . . . . . . .
is. . .
not displayed . . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 34 / 39
Structure of HTML document Element >> Attribute
Global attribute
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 35 / 39
Structure of HTML document My First Program
My First Program
b Open Gedit Text Editor using (terminal $gedit or show applications menu)
b Type the following lines in the Gedit Text Editor
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Homepage</title>
5 </head>
6 <body>
7 <h1>Welcome to my Homepage</h1>
8 </body>
9 </html>
<!DOCTYPE html>
<html>
<head>
<title>Hello</title> <!DOCTYPE html>
</head> <title>Hello</title>
<body> <p>Welcome to this example.</p>
<p>Welcome to this example.</p>
</body>
</html> . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 37 / 39
Structure of HTML document Parsing
Parse errors
b Parse errors are only errors with the syntax of HTML. In addition to checking for parse errors,
conformance checkers will also verify that the document obeys all the other conformance
requirements described in the specification.
- duplicate-attribute → If the parser encounters an attribute in a tag that already has an
attribute with the same name
- eof-in-tag → This error occurs if the parser encounters the end of the input stream in a start
tag or an end tag. For example: <div id=). Such a tag is ignored.
- end-tag-with-attributes → This error occurs if the parser encounters an end tag with attributes.
Attributes in end tags are ignored and do not make their way into the DOM.
- missing-attribute-value → This error occurs if the parser encounters a U+003E (>) code point
where an attribute value is expected (e.g., <div id=>). The parser treats the attribute as
having an empty value.
- unexpected-character-in-attribute-name → This error occurs if the parser encounters a U+0022
(”), U+0027 (’), or U+003C (<) code point in an attribute name. For example:
<div abc <div> or <div id'abc'>
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
nsaharia@iiitmanipur.ac.in Introduction to HTML 39 / 39