SlideShare a Scribd company logo
HTML
Source: https://www.w3schools.com/html/default.asp
Prepared by: Engr. Juvywen M. Pollentes
TOPICS:
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Attributes
 Attributes provide additional information about HTML
elements.
 All HTML elements can have attributes
 Attributes provide additional information about an element
 Attributes are always specified in the start tag
 Attributes usually come in name/value pairs
like: name="value"
The href Attribute
 HTML links are defined with the <a> tag. The link address is
specified in the href attribute:
The src Attribute
 HTML images are defined with the <img> tag.
 The filename of the image source is specified in
the src attribute:
The width and height Attributes
 The image size is specified in pixels: width="500"
means 500 pixels wide.
The alt Attribute
 The alt attribute specifies an alternative text to be used, when
an image cannot be displayed.
 The alt attribute is also useful if the image does not exist:
The style Attribute
 The style attribute is used to specify the styling of an element,
like color, font, size etc
The lang Attribute
 The language of the document can be
declared in the <html> tag.
 The language is declared with
the lang attribute.
 Declaring a language is important for
accessibility applications (screen
readers) and search engines:
 The first two letters specify the
language (en). If there is a dialect, use
two more letters (US).
The title Attribute
 A title attribute is added to the <p> element. The value of the
title attribute will be displayed as a tooltip when you mouse
over the paragraph:
We Suggest: Use Lowercase Attributes
 The HTML5 standard does not require lowercase attribute
names.
 The title attribute can be written with uppercase or lowercase
like title or TITLE.
 W3C recommends lowercase in HTML,
and demands lowercase for stricter document types like
XHTML.
We Suggest: Quote Attribute Values
 The HTML5 standard does not require quotes around
attribute values.
 The href attribute, demonstrated above, can be
written as:
 Using quotes are the most common. Omitting quotes
can produce errors.
Single or Double Quotes?
 Double quotes around attribute values are the most
common in HTML, but single quotes can also be used.
 In some situations, when the attribute value itself
contains double quotes, it is necessary to use single
quotes:
HTML 5 Topic 2
HTML Headings
HTML 5 Topic 2
 Headings are defined with the <h1> to <h6> tags.
 <h1> defines the most important heading. <h6> defines the
least important heading.
 Note: Browsers automatically add some white space (a
margin) before and after a heading.
Headings Are Important
 Search engines use the headings to index the structure and
content of your web pages.
 Users skim your pages by its headings. It is important to use
headings to show the document structure.
 <h1> headings should be used for main headings, followed by
<h2> headings, then the less important <h3>, and so on.
 Note: Use HTML headings for headings only. Don't use
headings to make text BIG or bold.
Bigger Headings
 Each HTML heading has a default size. However, you can
specify the size for any heading with the style attribute:
HTML Horizontal Rules
 The <hr> tag defines a thematic break in an HTML page, and
is most often displayed as a horizontal rule.
 The <hr> element is used to separate content (or define a
change) in an HTML page:
HTML 5 Topic 2
The HTML <head> Element
 The HTML <head> element has nothing to do with HTML
headings.
 The <head> element is a container for metadata. HTML
metadata is data about the HTML document. Metadata is not
displayed.
 The <head> element is placed between the <html> tag and
the <body> tag:
 Note: Metadata typically define the document title, character
set, styles, links, scripts, and other meta information.
How to View HTML Source?
View HTML Source Code:
 To find out, right-click in the page and select "View Page
Source" (in Chrome) or "View Source" (in IE), or similar in
other browsers. This will open a window containing the HTML
source code of the page.
HTML 5 Topic 2
HTML 5 Topic 2
 Inspect an HTML Element:
 Right-click on an element (or a blank area), and choose
"Inspect" or "Inspect Element" to see what elements are
made up of (you will see both the HTML and the CSS). You
can also edit the HTML or CSS on-the-fly in the Elements or
Styles panel that opens.
HTML 5 Topic 2
HTML 5 Topic 2
HTML 5 Topic 2
HTML Paragraphs
 The HTML <p> element defines a paragraph:
 Note: Browsers automatically add some white
space (a margin) before and after a paragraph.
HTML Display
 You cannot be sure how HTML will be displayed.
 Large or small screens, and resized windows will create
different results.
 With HTML, you cannot change the output by adding extra
spaces or extra lines in your HTML code.
 The browser will remove any extra spaces and extra lines
when the page is displayed.
HTML 5 Topic 2
HTML 5 Topic 2
Don't Forget the End Tag
 Most browsers will display HTML correctly even if
you forget the end tag:
 Note: Dropping the end tag can produce
unexpected results or errors.
HTML Line Breaks
 The HTML <br> element defines a line break.
 Use <br> if you want a line break (a new line)
without starting a new paragraph:
 The <br> tag is an empty tag, which means that it
has no end tag.
HTML 5 Topic 2
HTML 5 Topic 2
The HTML <pre> Element
 The HTML <pre> element defines preformatted
text.
 The text inside a <pre> element is displayed in a
fixed-width font (usually Courier), and it preserves
both spaces and line breaks:
HTML 5 Topic 2
HTML 5 Topic 2
HTML Styles
HTML 5 Topic 2
HTML 5 Topic 2
The HTML Style Attribute
 Setting the style of an HTML element, can be done with
the style attribute.
 The HTML style attribute has the following syntax:
<tagname style="property:value;">
 The property is a CSS property. The value is a CSS value.
You will learn more about CSS later in this tutorial.
HTML Background Color
 The background-color property defines the background
color for an HTML element.
 This example sets the background color for a page to
powderblue:
HTML 5 Topic 2
HTML Text Color
 The color property defines the text color for an HTML
element:
HTML 5 Topic 2
HTML Fonts
 The font-family property defines the font to be used
for an HTML element:
HTML 5 Topic 2
HTML Text Size
 The font-size property defines the text size for an HTML
element:
HTML 5 Topic 2
HTML Text Alignment
 The text-align property defines the horizontal text
alignment for an HTML element:
HTML 5 Topic 2
Chapter Summary
 Use the style attribute for styling HTML elements
 Use background-color for background color
 Use color for text colors
 Use font-family for text fonts
 Use font-size for text sizes
 Use text-align for text alignment

More Related Content

PPTX
HTML5 Topic 1
PPTX
Html5
PDF
Introduction to HTML
PPT
HTML Introduction
PPT
Html Slide Part-1
PDF
Introduction to CSS3
PDF
Introduction to Javascript
PDF
HTML5 Topic 1
Html5
Introduction to HTML
HTML Introduction
Html Slide Part-1
Introduction to CSS3
Introduction to Javascript

What's hot (20)

PPTX
Web Application and HTML Summary
PPTX
Computer fundamentals-internet p2
PPT
Xhtml
PPTX
WEB PAGE DESIGN USING HTML
PDF
Html Tutorial
PPT
PDF
Session4
DOCX
What is html xml and xhtml
PPSX
CSS Comprehensive Overview
PDF
Vskills certified html designer Notes
PPT
Introduction to HTML
DOCX
Practical file on web technology(html)
PPTX
PPT
Introduction to HTML
ODP
PDF
Introduction to XHTML
PPTX
Hyper text markup Language
PDF
Web technology practical list
PPTX
HTML Basics by software development company india
PPTX
Introduction to HTML
Web Application and HTML Summary
Computer fundamentals-internet p2
Xhtml
WEB PAGE DESIGN USING HTML
Html Tutorial
Session4
What is html xml and xhtml
CSS Comprehensive Overview
Vskills certified html designer Notes
Introduction to HTML
Practical file on web technology(html)
Introduction to HTML
Introduction to XHTML
Hyper text markup Language
Web technology practical list
HTML Basics by software development company india
Introduction to HTML

Similar to HTML 5 Topic 2 (20)

PPTX
HTML Training Part1
PDF
Html & Html5 from scratch
PPTX
Html Workshop
PPTX
Html basics
PDF
web development.pdf
PDF
Web Development 1 (HTML & CSS)
PPTX
PPTX
PPTX
HTML.pptx
PPT
Higher Computing Science HTML
PDF
Html tutorial
PDF
Html basics
PPTX
PPTX
HTML_HEADER PART TAGS .pptx
PPTX
Webithon Workshop
PDF
Web Development 3 (HTML & CSS)
PPTX
PDF
HTML - part 1
PPTX
Chapter 2 - Introduction to HTML (Basic Structures and Syntax).pptx
HTML Training Part1
Html & Html5 from scratch
Html Workshop
Html basics
web development.pdf
Web Development 1 (HTML & CSS)
HTML.pptx
Higher Computing Science HTML
Html tutorial
Html basics
HTML_HEADER PART TAGS .pptx
Webithon Workshop
Web Development 3 (HTML & CSS)
HTML - part 1
Chapter 2 - Introduction to HTML (Basic Structures and Syntax).pptx

More from Juvywen (15)

PPTX
Chapter 1 Introduction to Media and Information Literacy
PPTX
Chapter 2 Understanding Counselling
PPTX
Chapter 1 The Social Sciences and the Applied Social Sciences
PDF
Chapter 2 Study Guide- Understanding Counselling
PPTX
Lesson 4 Career Opportunities and Business Ideas in Cooking
PPTX
Lesson 3 Measuring Tools and Techniques
PPTX
Lesson 2 Kitchen and Kitchen Layout
PPTX
Lesson 1 Basic Cooking Methods and Food Preparation Techniques
PPTX
Lesson 7
PPTX
Lesson 6
PPTX
Lesson 1 2 Edited
PPTX
Lesson 5 Manipulating Text, Graphics, and Images
PPTX
Lesson 4- Developing ict content for specific purposes
PPTX
Lesson 3
PPTX
LESSON 1, 2 & 3-ETECH 1S
Chapter 1 Introduction to Media and Information Literacy
Chapter 2 Understanding Counselling
Chapter 1 The Social Sciences and the Applied Social Sciences
Chapter 2 Study Guide- Understanding Counselling
Lesson 4 Career Opportunities and Business Ideas in Cooking
Lesson 3 Measuring Tools and Techniques
Lesson 2 Kitchen and Kitchen Layout
Lesson 1 Basic Cooking Methods and Food Preparation Techniques
Lesson 7
Lesson 6
Lesson 1 2 Edited
Lesson 5 Manipulating Text, Graphics, and Images
Lesson 4- Developing ict content for specific purposes
Lesson 3
LESSON 1, 2 & 3-ETECH 1S

Recently uploaded (20)

PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Basic Mud Logging Guide for educational purpose
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Lesson notes of climatology university.
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Institutional Correction lecture only . . .
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Final Presentation General Medicine 03-08-2024.pptx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Basic Mud Logging Guide for educational purpose
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Lesson notes of climatology university.
TR - Agricultural Crops Production NC III.pdf
Microbial disease of the cardiovascular and lymphatic systems
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPH.pptx obstetrics and gynecology in nursing
STATICS OF THE RIGID BODIES Hibbelers.pdf
RMMM.pdf make it easy to upload and study
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Renaissance Architecture: A Journey from Faith to Humanism
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Institutional Correction lecture only . . .
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx

HTML 5 Topic 2

  • 4.  Attributes provide additional information about HTML elements.  All HTML elements can have attributes  Attributes provide additional information about an element  Attributes are always specified in the start tag  Attributes usually come in name/value pairs like: name="value"
  • 5. The href Attribute  HTML links are defined with the <a> tag. The link address is specified in the href attribute:
  • 6. The src Attribute  HTML images are defined with the <img> tag.  The filename of the image source is specified in the src attribute:
  • 7. The width and height Attributes  The image size is specified in pixels: width="500" means 500 pixels wide.
  • 8. The alt Attribute  The alt attribute specifies an alternative text to be used, when an image cannot be displayed.
  • 9.  The alt attribute is also useful if the image does not exist:
  • 10. The style Attribute  The style attribute is used to specify the styling of an element, like color, font, size etc
  • 11. The lang Attribute  The language of the document can be declared in the <html> tag.  The language is declared with the lang attribute.  Declaring a language is important for accessibility applications (screen readers) and search engines:  The first two letters specify the language (en). If there is a dialect, use two more letters (US).
  • 12. The title Attribute  A title attribute is added to the <p> element. The value of the title attribute will be displayed as a tooltip when you mouse over the paragraph:
  • 13. We Suggest: Use Lowercase Attributes  The HTML5 standard does not require lowercase attribute names.  The title attribute can be written with uppercase or lowercase like title or TITLE.  W3C recommends lowercase in HTML, and demands lowercase for stricter document types like XHTML.
  • 14. We Suggest: Quote Attribute Values  The HTML5 standard does not require quotes around attribute values.  The href attribute, demonstrated above, can be written as:  Using quotes are the most common. Omitting quotes can produce errors.
  • 15. Single or Double Quotes?  Double quotes around attribute values are the most common in HTML, but single quotes can also be used.  In some situations, when the attribute value itself contains double quotes, it is necessary to use single quotes:
  • 19.  Headings are defined with the <h1> to <h6> tags.  <h1> defines the most important heading. <h6> defines the least important heading.  Note: Browsers automatically add some white space (a margin) before and after a heading.
  • 20. Headings Are Important  Search engines use the headings to index the structure and content of your web pages.  Users skim your pages by its headings. It is important to use headings to show the document structure.  <h1> headings should be used for main headings, followed by <h2> headings, then the less important <h3>, and so on.  Note: Use HTML headings for headings only. Don't use headings to make text BIG or bold.
  • 21. Bigger Headings  Each HTML heading has a default size. However, you can specify the size for any heading with the style attribute:
  • 22. HTML Horizontal Rules  The <hr> tag defines a thematic break in an HTML page, and is most often displayed as a horizontal rule.  The <hr> element is used to separate content (or define a change) in an HTML page:
  • 24. The HTML <head> Element  The HTML <head> element has nothing to do with HTML headings.  The <head> element is a container for metadata. HTML metadata is data about the HTML document. Metadata is not displayed.  The <head> element is placed between the <html> tag and the <body> tag:
  • 25.  Note: Metadata typically define the document title, character set, styles, links, scripts, and other meta information.
  • 26. How to View HTML Source? View HTML Source Code:  To find out, right-click in the page and select "View Page Source" (in Chrome) or "View Source" (in IE), or similar in other browsers. This will open a window containing the HTML source code of the page.
  • 29.  Inspect an HTML Element:  Right-click on an element (or a blank area), and choose "Inspect" or "Inspect Element" to see what elements are made up of (you will see both the HTML and the CSS). You can also edit the HTML or CSS on-the-fly in the Elements or Styles panel that opens.
  • 34.  The HTML <p> element defines a paragraph:  Note: Browsers automatically add some white space (a margin) before and after a paragraph.
  • 35. HTML Display  You cannot be sure how HTML will be displayed.  Large or small screens, and resized windows will create different results.  With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code.  The browser will remove any extra spaces and extra lines when the page is displayed.
  • 38. Don't Forget the End Tag  Most browsers will display HTML correctly even if you forget the end tag:  Note: Dropping the end tag can produce unexpected results or errors.
  • 39. HTML Line Breaks  The HTML <br> element defines a line break.  Use <br> if you want a line break (a new line) without starting a new paragraph:  The <br> tag is an empty tag, which means that it has no end tag.
  • 42. The HTML <pre> Element  The HTML <pre> element defines preformatted text.  The text inside a <pre> element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks:
  • 48. The HTML Style Attribute  Setting the style of an HTML element, can be done with the style attribute.  The HTML style attribute has the following syntax: <tagname style="property:value;">  The property is a CSS property. The value is a CSS value. You will learn more about CSS later in this tutorial.
  • 49. HTML Background Color  The background-color property defines the background color for an HTML element.  This example sets the background color for a page to powderblue:
  • 51. HTML Text Color  The color property defines the text color for an HTML element:
  • 53. HTML Fonts  The font-family property defines the font to be used for an HTML element:
  • 55. HTML Text Size  The font-size property defines the text size for an HTML element:
  • 57. HTML Text Alignment  The text-align property defines the horizontal text alignment for an HTML element:
  • 59. Chapter Summary  Use the style attribute for styling HTML elements  Use background-color for background color  Use color for text colors  Use font-family for text fonts  Use font-size for text sizes  Use text-align for text alignment

Editor's Notes

  • #2: HTML5 Tutorial With HTML you can create your own Web site.
  • #6:  HREF. HREF. (Hypertext REFerence) The HTML code used to create a link to another page. The HREF is an attribute of the anchor tag, which is also used to identify sections within a document.
  • #13: Attribute-characteristics, qulity, feature
  • #21: Index-guide Skim-glance
  • #27: Have you ever seen a Web page and wondered "Hey! How did they do that?"
  • #57: <h1 style = "color:blue; font-size:1000%;"> This is a heading</h1>