SlideShare a Scribd company logo
By
Lakshmi R
Asst. professor
Dept. of ISE
Elements attributes
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
Tag
<element-name>
<beginning-tag>
</ending-tag>
<body bgcolor = "purple"> Hello Everybody! </body>
Element
name
Attribute Content
May be text or
other HTML
elements
Closing tag
Name = value pair
<img src = “file-name.jpg“ />
Element
name
Trailing slashAttributeEmpty Element
An empty
element does not
contain any text
content; instead, it
is an instruction to
the browser to do
something.
2
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
HTML element will contain other
HTML elements
Container element - a parent
of the contained - child,
element.
Elements contained within the
child - descendants of the
parent element
Any given child element, may
have a variety of ancestors.
Outline 3
 In order to properly construct this hierarchy of elements,
each HTML nested element to be properly nested.
 child’s ending tag must occur before its parent’s ending tag
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
4
 Structural markup and presentation-oriented markup (visual
markup)
 Semantic - structural
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
HTML CSS
Structural -
headings, lists,
paragraphs,
links, images,
navigation, footers,
and so on.
Styling -
Typeface/font
Emphasis (bold,
italics, underline)
Justification,
indentation, Color
Advantages – Semantic markup
 Maintainability. Semantic markup is easier to update
and change than web pages that contain a great deal
of presentation markup.
 Faster. Semantic web pages are typically quicker to
author and faster to download.
 Accessibility. voice reading software can be a very
frustrating experience if the site does not use
semantic markup. (For visually impaired)
 Search engine optimization. Most important users of
a website are the various search engine crawlers -
are automated programs that cross the web scanning
sites for their content - used for users’ search
queries. Semantic markup provides better
instructions for these crawlers: it tells them what
things are important content on the site.
5
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
The <title> element:
 broad description of the content
 used by the browser for its
bookmarks
 browser history list
 search engines will use the page’s
title as the linked text in their
search engine result pages.
6
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
7
Document Type Definition
 Tells the browser (or any other client software that is reading this HTML
document) what type of document it is about to process.
 Document Type Definitions (DTD) define a document’s type for markup
languages such as HTML and XML.
 The HTML5 doctype is quite short in comparison to one of the standard
doctype specifications for XHTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN”
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
8
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
<html> - root element as it contains all the other HTML elements
in the document.
lang attribute - optional attribute tells the browser the natural
language that is being used for textual content in the HTML
document, which is English in this example.
Two sections – head and body
9
Descriptive
elements about
the document
<head>
Meta
information
Title
Style
sheets
JavaScript
Search Engines
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
10
<meta>
 Encoding for the document is UTF-8.
 Character encoding - which character set standard is
being used to encode the characters in the document.
 ASCII standard – 8-bit for each character
 English (or more properly Latin) upper and lowercase letters
 common punctuation symbols
 UTF-8 is a more complete variable-width encoding
system
 Encode all 110,000 characters in the Unicode character set (which in itself
supports over 100 different language scripts).
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
11
<link>
 Specifies an external CSS style sheet file that is used
with this document.
 To define the visual look of the HTML elements in the
document.
 For consistency’s sake, most sites place most or all of
their style definitions within one or more external style
sheet files.
 In this example, the file being referenced (main.css)
resides within a subfolder called css.
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
12
<script>
 references an external JavaScript file.
 Like with style definitions, JavaScript code can be
written directly within the HTML or contained within an
external file.
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
13
14
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
 Six levels of heading : <h1> <h2> <h3> <h4> <h5> <h6>
Why Heading?
 To create document outline for the page
 Document outline is not seen on page; it is an internal data representation of the control
on the page.
 Used to render the page
 Document outline is constructed from headings and other structural tags
 Specify a heading level that sis semantically (structurally) accurate.
Note: Do not choose a heading level because of its default presentation (e.g., choosing
<h3> because you want your text to be bold and 16pt).
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 15
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
<p> </p>
<div> </div>
Used to create logical grouping of contents
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 16
Container elements
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 17
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
 Block-level elements
 Unordered list - <ul>
 Collections of items in no particular order.
 Bulleted list
 Ordered list - <ol>
 Collections of items that have a set order
 Numbered list
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 18
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 19
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
• Improves maintainability and accessibility of
web pages.
• There is no predefined presentation for these
tags
• They give indication as to what type of content
they contain or what role that content plays in
the page.
• That explicit information helps robots/crawlers
like Google to better understand which content
is important, which is a subsidiary, which is for
navigation, and so on.
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 20
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
• Site logo
• Title
• Subtitles
• Taglines
• Horizontal
navigation links
• Horizontal Banners
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 21
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 22
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
•Less important material
•Smaller text version of
navigation
•Contact us
•Copyright notices
•Site’s privacy policy
•Link to other social
sites
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 23
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 24
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
• Section of a page that
contains links to other
pages or to other parts
within the page
• Does not apply any special
presentation.
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 25
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
• Element specifies independent,
self-contained content
• Examples
• Forum post
• Blog post
• New
• HTML pages can have <section>
element containing <article>, and
<article> element containing
<section> element.
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 26
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
• For marking up the content
that is separate from the
main content
• Examples:
• Sidebars
• Pull quotes
• Advertising images
• Grouping of non-
essential elements
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 27
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
[1] Randy Connolly, Ricardo Hoar, "Fundamentals of Web
Development”, 1stEdition,Pearson Education India.
(ISBN:978-9332575271)
[2] https://www.w3schools.com/
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 28
LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE

More Related Content

PPTX
What is xml
PPTX
Xml and xml processor
PPTX
Html5 final
PPTX
PDF
Xml
PPT
10. XML in DBMS

What's hot (20)

PDF
23xml
PPTX
Introduction to html5
PDF
Python xml processing
PPTX
PPTX
Structure of url, uniform resource locator
PPTX
Web page concept final ppt
PPT
XML Databases
PPT
XML and Databases
PPTX
Xml data transformation
PPT
Intro to HTML5
PDF
Basics and different xml files used in android
PPT
uptu web technology unit 2 Xml2
PPTX
Html Simple Tutorial
PDF
XML and XML Applications - Lecture 04 - Web Information Systems (WE-DINF-11912)
PPTX
Xml applications
PPT
Introduction to XML
23xml
Introduction to html5
Python xml processing
Structure of url, uniform resource locator
Web page concept final ppt
XML Databases
XML and Databases
Xml data transformation
Intro to HTML5
Basics and different xml files used in android
uptu web technology unit 2 Xml2
Html Simple Tutorial
XML and XML Applications - Lecture 04 - Web Information Systems (WE-DINF-11912)
Xml applications
Introduction to XML
Ad

Similar to Html basics (20)

PDF
Class Intro / HTML Basics
DOCX
INTRODUCTION TO HTML
PDF
HTML Foundations, part 1
PPT
Intr to-html-xhtml-1233508169541646-3
PPTX
Markup Documents
PPTX
Web technologies part-2
PPTX
HTML/HTML5
PDF
GDI Seattle Intermediate HTML and CSS Class 1
PPTX
HTML and CSS Basics
PDF
HTML practical file
DOCX
1.2 Unit 2 Notes - for year 12 html.docx
PPTX
Xml and xml processor
PDF
Week 2-intro-html
PDF
Introduction to Javascript
PDF
html-basic.pdf
DOCX
What is html xml and xhtml
PPTX
web programming, Introduction to html tags
Class Intro / HTML Basics
INTRODUCTION TO HTML
HTML Foundations, part 1
Intr to-html-xhtml-1233508169541646-3
Markup Documents
Web technologies part-2
HTML/HTML5
GDI Seattle Intermediate HTML and CSS Class 1
HTML and CSS Basics
HTML practical file
1.2 Unit 2 Notes - for year 12 html.docx
Xml and xml processor
Week 2-intro-html
Introduction to Javascript
html-basic.pdf
What is html xml and xhtml
web programming, Introduction to html tags
Ad

More from Lakshmi R (11)

PDF
Proofs and disproofs
PDF
Use of quantifiers
PDF
Css basics
PDF
Logical implication - Necessary and Sufficient conditions
PDF
NAND and NOR connectives
PDF
Discrete Mathematical Structures - Fundamentals of Logic - Principle of duality
PDF
Fundamentals of logic 1
PDF
Logical equivalence, laws of logic
PDF
Rules of inference
PDF
Java Collection Framework
PDF
Jsp presentation
Proofs and disproofs
Use of quantifiers
Css basics
Logical implication - Necessary and Sufficient conditions
NAND and NOR connectives
Discrete Mathematical Structures - Fundamentals of Logic - Principle of duality
Fundamentals of logic 1
Logical equivalence, laws of logic
Rules of inference
Java Collection Framework
Jsp presentation

Recently uploaded (20)

PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPTX
UNIT 4 Total Quality Management .pptx
PDF
composite construction of structures.pdf
PPTX
Artificial Intelligence
PPTX
additive manufacturing of ss316l using mig welding
PPTX
Sustainable Sites - Green Building Construction
PPT
Project quality management in manufacturing
PPTX
Fundamentals of safety and accident prevention -final (1).pptx
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
Well-logging-methods_new................
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Current and future trends in Computer Vision.pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Geodesy 1.pptx...............................................
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
UNIT 4 Total Quality Management .pptx
composite construction of structures.pdf
Artificial Intelligence
additive manufacturing of ss316l using mig welding
Sustainable Sites - Green Building Construction
Project quality management in manufacturing
Fundamentals of safety and accident prevention -final (1).pptx
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Well-logging-methods_new................
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Current and future trends in Computer Vision.pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Geodesy 1.pptx...............................................
Automation-in-Manufacturing-Chapter-Introduction.pdf

Html basics

  • 2. Elements attributes LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE Tag <element-name> <beginning-tag> </ending-tag> <body bgcolor = "purple"> Hello Everybody! </body> Element name Attribute Content May be text or other HTML elements Closing tag Name = value pair <img src = “file-name.jpg“ /> Element name Trailing slashAttributeEmpty Element An empty element does not contain any text content; instead, it is an instruction to the browser to do something. 2
  • 3. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE HTML element will contain other HTML elements Container element - a parent of the contained - child, element. Elements contained within the child - descendants of the parent element Any given child element, may have a variety of ancestors. Outline 3
  • 4.  In order to properly construct this hierarchy of elements, each HTML nested element to be properly nested.  child’s ending tag must occur before its parent’s ending tag LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 4
  • 5.  Structural markup and presentation-oriented markup (visual markup)  Semantic - structural LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE HTML CSS Structural - headings, lists, paragraphs, links, images, navigation, footers, and so on. Styling - Typeface/font Emphasis (bold, italics, underline) Justification, indentation, Color Advantages – Semantic markup  Maintainability. Semantic markup is easier to update and change than web pages that contain a great deal of presentation markup.  Faster. Semantic web pages are typically quicker to author and faster to download.  Accessibility. voice reading software can be a very frustrating experience if the site does not use semantic markup. (For visually impaired)  Search engine optimization. Most important users of a website are the various search engine crawlers - are automated programs that cross the web scanning sites for their content - used for users’ search queries. Semantic markup provides better instructions for these crawlers: it tells them what things are important content on the site. 5
  • 6. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE The <title> element:  broad description of the content  used by the browser for its bookmarks  browser history list  search engines will use the page’s title as the linked text in their search engine result pages. 6
  • 7. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 7
  • 8. Document Type Definition  Tells the browser (or any other client software that is reading this HTML document) what type of document it is about to process.  Document Type Definitions (DTD) define a document’s type for markup languages such as HTML and XML.  The HTML5 doctype is quite short in comparison to one of the standard doctype specifications for XHTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN” "http://www.w3.org/TR/xhtml1/DTD/xhtml1- transitional.dtd"> LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 8
  • 9. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE <html> - root element as it contains all the other HTML elements in the document. lang attribute - optional attribute tells the browser the natural language that is being used for textual content in the HTML document, which is English in this example. Two sections – head and body 9
  • 11. <meta>  Encoding for the document is UTF-8.  Character encoding - which character set standard is being used to encode the characters in the document.  ASCII standard – 8-bit for each character  English (or more properly Latin) upper and lowercase letters  common punctuation symbols  UTF-8 is a more complete variable-width encoding system  Encode all 110,000 characters in the Unicode character set (which in itself supports over 100 different language scripts). LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 11
  • 12. <link>  Specifies an external CSS style sheet file that is used with this document.  To define the visual look of the HTML elements in the document.  For consistency’s sake, most sites place most or all of their style definitions within one or more external style sheet files.  In this example, the file being referenced (main.css) resides within a subfolder called css. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 12
  • 13. <script>  references an external JavaScript file.  Like with style definitions, JavaScript code can be written directly within the HTML or contained within an external file. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 13
  • 14. 14 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 15.  Six levels of heading : <h1> <h2> <h3> <h4> <h5> <h6> Why Heading?  To create document outline for the page  Document outline is not seen on page; it is an internal data representation of the control on the page.  Used to render the page  Document outline is constructed from headings and other structural tags  Specify a heading level that sis semantically (structurally) accurate. Note: Do not choose a heading level because of its default presentation (e.g., choosing <h3> because you want your text to be bold and 16pt). LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 15 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 16. <p> </p> <div> </div> Used to create logical grouping of contents LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 16 Container elements LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 17. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 17 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 18.  Block-level elements  Unordered list - <ul>  Collections of items in no particular order.  Bulleted list  Ordered list - <ol>  Collections of items that have a set order  Numbered list LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 18 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 19. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 19 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE • Improves maintainability and accessibility of web pages. • There is no predefined presentation for these tags • They give indication as to what type of content they contain or what role that content plays in the page. • That explicit information helps robots/crawlers like Google to better understand which content is important, which is a subsidiary, which is for navigation, and so on.
  • 20. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 20 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE • Site logo • Title • Subtitles • Taglines • Horizontal navigation links • Horizontal Banners
  • 21. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 21 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 22. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 22 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE •Less important material •Smaller text version of navigation •Contact us •Copyright notices •Site’s privacy policy •Link to other social sites
  • 23. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 23 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 24. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 24 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE • Section of a page that contains links to other pages or to other parts within the page • Does not apply any special presentation.
  • 25. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 25 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE • Element specifies independent, self-contained content • Examples • Forum post • Blog post • New • HTML pages can have <section> element containing <article>, and <article> element containing <section> element.
  • 26. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 26 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE • For marking up the content that is separate from the main content • Examples: • Sidebars • Pull quotes • Advertising images • Grouping of non- essential elements
  • 27. LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 27 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE
  • 28. [1] Randy Connolly, Ricardo Hoar, "Fundamentals of Web Development”, 1stEdition,Pearson Education India. (ISBN:978-9332575271) [2] https://www.w3schools.com/ LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE 28 LAKSHMI R, ASST. PROFESSOR, DEPT. OF ISE