SlideShare a Scribd company logo
1 of 13
HTML (HYPERTEXT MARKUP LANGUAGE)
INTRODUCTION TO HTML
• What is HTML?
• HTML is the language used to create the websites you visit everyday.
It provides a logical way to structure content for websites.
• Let's analyze the acronym "HTML," as it contains a lot of useful
information. HTML stands for HyperText Markup Language.
• A markup language is a computer language that defines the structure
and presentation of raw text. Markup languages work by surrounding
raw text with information the computer can interpret, "marking it up"
to be processed.
!DOCTYPE
• Whether you realize it or not, when you read text, your brain must
first identify the text's language. If you can understand that
language, then your brain immediately begins to interpret the text.
This same process happens whether you're reading a street sign, a
book, or a name tag.
• Web browsers work in a similar way. They must know what language
a document is written in before they can process its contents.
• You can let web browsers know that you are using HTML by starting
your document with a document type declaration.
• The declaration looks like this: <!DOCTYPE html>
• This declaration is an instruction. It tells the browser what type of document
to expect, along with what version of HTML is being used in the document.
• <!DOCTYPE html> must be the first line of code in all of your HTML
documents. If you don't use the declaration, your HTML code will likely still
work, however, it's risky. For now, the browser will correctly assume that the
HTML in <!DOCTYPE html> is referring to HTML 5 as it is the current
standard.
• To make sure your document is forever interpreted correctly, always include
• <!DOCTYPE html> at the very beginning of your HTML documents.
• The <!DOCTYPE html> declaration is only the beginning, however. It
indicates to the browser that you will use HTML in the document, but
it doesn't actually add any HTML structure or content.
• To create HTML structure and content, we must add opening and
closing <html> tags, like so:
• Anything between the opening <html> and closing </html> tags will
be interpreted as HTML code. Without these tags, it's possible that
browsers could incorrectly interpret your HTML code.
• HTML Anatomy
• Before we move forward, it's important that we discuss how HTML elements are
structured.
• In this example, the paragraph element is made up of one opening tag <p> , the
“Hello world!” text, and a closing tag </p>
• Let's quickly review each part of the tag pictured:
• HTML Tag - The element name, surrounded by an opening (<) and closing (>)
angle bracket.
• HTML element (or simply, element) - a unit of content in an HTML document
formed by HTML tags and the text or media it contains.
• Opening tag - the first HTML tag used to start an HTML element. The tag type is
surrounded by opening and closing angle brackets.
• Element content - The information (text or other elements) contained between
the opening and closing tags of an HTML element.
• Closing tag - the second HTML tag used to end an HTML element. Closing tags
have a forward slash (/) inside of them, directly after the left angle bracket.
• Most elements require both opening and closing tags, but some call for a single
THE HEAD
• So far we've done two things:
• Declared to the browser that your code is HTML.
• Added the HTML element <html> that will contain the rest of
your code.
• Let's also give the browser some information about the page.
We can do this by adding a <head> Element.
• element contains the metadata for a web page. Metadata is
information about the page that isn't displayed directly on the
web page. You'll see an example of this in the next exercise.
• The opening and closing head tags <head></head> typically
appear as the first item after your first HTML tag.
PAGE TITLES
• What kind of metadata about the web page can the <head>
element contain?
• The browser displays the title of the page because the title can
be specified directly inside of the <head> element, by using
a title tag.
• If we were to open a file containing the HTML code in the
example above, the browser would display the words “my first
webpage” in the title bar (or in the tab's title).
THE BODY
• We've added some HTML, but still haven't seen any results in
the web browser to the right. Why is that?
• Before we can add content that a browser will display, we have
to add a body to the HTML file. Only content inside the opening
and closing body tags can be displayed to the screen.
• Once the file has a body, many different types of content –
including text, images, and buttons – can be added to the
body.
SELF-CLOSING TAG
• Thus far we have only seen HTML elements with an opening and a
closing tag. A few types of elements, however, require only one tag.
• Self-closing elements contain all the information the browser needs
to render the element inside a single tag. Also, because they are
single tags, they cannot wrap around raw text or other elements.
• The line break element <br /> is one example of a self-closing tag.
You can use it anywhere within your HTML code. The result is a line
break in the browser.
• Without the break tag, the browser would render line one and line
two on the same line.
HTML STRUCTURE
• HTML documents are organized as a collection of parent-child
relationships. When an element is contained inside another
element, it is considered the child of that element. The child
element is said to be nested inside of the parent element.

More Related Content

What's hot

The Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for BeginnersThe Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for BeginnersRasin Bekkevold
 
HTML- Hyper Text Markup Language
HTML- Hyper Text Markup LanguageHTML- Hyper Text Markup Language
HTML- Hyper Text Markup LanguageTrinity Dwarka
 
Introduction to html fundamental concepts
Introduction to html fundamental conceptsIntroduction to html fundamental concepts
Introduction to html fundamental conceptsTsebo Shaun Masilo
 
How the Web Works Using HTML
How the Web Works Using HTMLHow the Web Works Using HTML
How the Web Works Using HTMLMarlon Jamera
 
An Introduction to HTML
An Introduction to HTMLAn Introduction to HTML
An Introduction to HTMLcrea8ivemoiz
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTMLyht4ever
 
HTML5 Topic 1
HTML5 Topic 1HTML5 Topic 1
HTML5 Topic 1Juvywen
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introductionc525600
 
Summary of-xhtml-basics
Summary of-xhtml-basicsSummary of-xhtml-basics
Summary of-xhtml-basicsstarlanter
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to htmlmyrajendra
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTMLMayaLisa
 

What's hot (20)

Html
HtmlHtml
Html
 
The Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for BeginnersThe Difference between HTML, XHTML & HTML5 for Beginners
The Difference between HTML, XHTML & HTML5 for Beginners
 
Html presantation
Html presantationHtml presantation
Html presantation
 
HTML- Hyper Text Markup Language
HTML- Hyper Text Markup LanguageHTML- Hyper Text Markup Language
HTML- Hyper Text Markup Language
 
Html Tutorial
Html Tutorial Html Tutorial
Html Tutorial
 
Learn html from www
Learn html from wwwLearn html from www
Learn html from www
 
Introduction to html fundamental concepts
Introduction to html fundamental conceptsIntroduction to html fundamental concepts
Introduction to html fundamental concepts
 
Html Tutorial
Html TutorialHtml Tutorial
Html Tutorial
 
How the Web Works Using HTML
How the Web Works Using HTMLHow the Web Works Using HTML
How the Web Works Using HTML
 
An Introduction to HTML
An Introduction to HTMLAn Introduction to HTML
An Introduction to HTML
 
Html basics
Html basicsHtml basics
Html basics
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
HTML5 Topic 1
HTML5 Topic 1HTML5 Topic 1
HTML5 Topic 1
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Html - Tutorial
Html - TutorialHtml - Tutorial
Html - Tutorial
 
Summary of-xhtml-basics
Summary of-xhtml-basicsSummary of-xhtml-basics
Summary of-xhtml-basics
 
1 introduction to html
1 introduction to html1 introduction to html
1 introduction to html
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
A109 base code html
A109 base code   htmlA109 base code   html
A109 base code html
 

Similar to Html (hypertext markup language)

HYPER TEXT MARKUP LANGUAGE BASIC LESSONS
HYPER TEXT MARKUP LANGUAGE BASIC LESSONSHYPER TEXT MARKUP LANGUAGE BASIC LESSONS
HYPER TEXT MARKUP LANGUAGE BASIC LESSONSdivyajohnisg
 
Grade 7_HTML.pptx
Grade 7_HTML.pptxGrade 7_HTML.pptx
Grade 7_HTML.pptxshilpak0307
 
Web design - HTML (Hypertext Markup Language) introduction
Web design - HTML (Hypertext Markup Language) introductionWeb design - HTML (Hypertext Markup Language) introduction
Web design - HTML (Hypertext Markup Language) introductionMustafa Kamel Mohammadi
 
HTML course.ppt
HTML course.pptHTML course.ppt
HTML course.pptRyanTeo35
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2Leo Mark Villar
 
Web forms and html (lect 1)
Web forms and html (lect 1)Web forms and html (lect 1)
Web forms and html (lect 1)Salman Memon
 
introdution-to-html.ppt coding programming
introdution-to-html.ppt coding programmingintrodution-to-html.ppt coding programming
introdution-to-html.ppt coding programmingprogramizconsultancy
 
CreatingWebPages-Part1.ppt
CreatingWebPages-Part1.pptCreatingWebPages-Part1.ppt
CreatingWebPages-Part1.pptHamzaAhmad861123
 
INTRODUCTION TO HTML.pptx
INTRODUCTION TO HTML.pptxINTRODUCTION TO HTML.pptx
INTRODUCTION TO HTML.pptxSaurabh821709
 

Similar to Html (hypertext markup language) (20)

Class1slides
Class1slidesClass1slides
Class1slides
 
HYPER TEXT MARKUP LANGUAGE BASIC LESSONS
HYPER TEXT MARKUP LANGUAGE BASIC LESSONSHYPER TEXT MARKUP LANGUAGE BASIC LESSONS
HYPER TEXT MARKUP LANGUAGE BASIC LESSONS
 
Let me design
Let me designLet me design
Let me design
 
Grade 7_HTML.pptx
Grade 7_HTML.pptxGrade 7_HTML.pptx
Grade 7_HTML.pptx
 
1. html introduction
1. html introduction1. html introduction
1. html introduction
 
Web design - HTML (Hypertext Markup Language) introduction
Web design - HTML (Hypertext Markup Language) introductionWeb design - HTML (Hypertext Markup Language) introduction
Web design - HTML (Hypertext Markup Language) introduction
 
HTML course.ppt
HTML course.pptHTML course.ppt
HTML course.ppt
 
Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2
 
Web forms and html (lect 1)
Web forms and html (lect 1)Web forms and html (lect 1)
Web forms and html (lect 1)
 
Html
HtmlHtml
Html
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
introdution-to-html.ppt coding programming
introdution-to-html.ppt coding programmingintrodution-to-html.ppt coding programming
introdution-to-html.ppt coding programming
 
Html5.pptx
Html5.pptxHtml5.pptx
Html5.pptx
 
Web design 101
Web design 101Web design 101
Web design 101
 
Html Concept
Html ConceptHtml Concept
Html Concept
 
HTML 5 Tutorial
HTML 5 TutorialHTML 5 Tutorial
HTML 5 Tutorial
 
CreatingWebPages-Part1.ppt
CreatingWebPages-Part1.pptCreatingWebPages-Part1.ppt
CreatingWebPages-Part1.ppt
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 
INTRODUCTION TO HTML.pptx
INTRODUCTION TO HTML.pptxINTRODUCTION TO HTML.pptx
INTRODUCTION TO HTML.pptx
 

Recently uploaded

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

Html (hypertext markup language)

  • 2. INTRODUCTION TO HTML • What is HTML? • HTML is the language used to create the websites you visit everyday. It provides a logical way to structure content for websites. • Let's analyze the acronym "HTML," as it contains a lot of useful information. HTML stands for HyperText Markup Language. • A markup language is a computer language that defines the structure and presentation of raw text. Markup languages work by surrounding raw text with information the computer can interpret, "marking it up" to be processed.
  • 3. !DOCTYPE • Whether you realize it or not, when you read text, your brain must first identify the text's language. If you can understand that language, then your brain immediately begins to interpret the text. This same process happens whether you're reading a street sign, a book, or a name tag. • Web browsers work in a similar way. They must know what language a document is written in before they can process its contents. • You can let web browsers know that you are using HTML by starting your document with a document type declaration.
  • 4. • The declaration looks like this: <!DOCTYPE html> • This declaration is an instruction. It tells the browser what type of document to expect, along with what version of HTML is being used in the document. • <!DOCTYPE html> must be the first line of code in all of your HTML documents. If you don't use the declaration, your HTML code will likely still work, however, it's risky. For now, the browser will correctly assume that the HTML in <!DOCTYPE html> is referring to HTML 5 as it is the current standard. • To make sure your document is forever interpreted correctly, always include • <!DOCTYPE html> at the very beginning of your HTML documents.
  • 5. • The <!DOCTYPE html> declaration is only the beginning, however. It indicates to the browser that you will use HTML in the document, but it doesn't actually add any HTML structure or content. • To create HTML structure and content, we must add opening and closing <html> tags, like so: • Anything between the opening <html> and closing </html> tags will be interpreted as HTML code. Without these tags, it's possible that browsers could incorrectly interpret your HTML code.
  • 6.
  • 7. • HTML Anatomy • Before we move forward, it's important that we discuss how HTML elements are structured. • In this example, the paragraph element is made up of one opening tag <p> , the “Hello world!” text, and a closing tag </p> • Let's quickly review each part of the tag pictured: • HTML Tag - The element name, surrounded by an opening (<) and closing (>) angle bracket. • HTML element (or simply, element) - a unit of content in an HTML document formed by HTML tags and the text or media it contains. • Opening tag - the first HTML tag used to start an HTML element. The tag type is surrounded by opening and closing angle brackets. • Element content - The information (text or other elements) contained between the opening and closing tags of an HTML element. • Closing tag - the second HTML tag used to end an HTML element. Closing tags have a forward slash (/) inside of them, directly after the left angle bracket. • Most elements require both opening and closing tags, but some call for a single
  • 8. THE HEAD • So far we've done two things: • Declared to the browser that your code is HTML. • Added the HTML element <html> that will contain the rest of your code. • Let's also give the browser some information about the page. We can do this by adding a <head> Element.
  • 9. • element contains the metadata for a web page. Metadata is information about the page that isn't displayed directly on the web page. You'll see an example of this in the next exercise. • The opening and closing head tags <head></head> typically appear as the first item after your first HTML tag.
  • 10. PAGE TITLES • What kind of metadata about the web page can the <head> element contain? • The browser displays the title of the page because the title can be specified directly inside of the <head> element, by using a title tag. • If we were to open a file containing the HTML code in the example above, the browser would display the words “my first webpage” in the title bar (or in the tab's title).
  • 11. THE BODY • We've added some HTML, but still haven't seen any results in the web browser to the right. Why is that? • Before we can add content that a browser will display, we have to add a body to the HTML file. Only content inside the opening and closing body tags can be displayed to the screen. • Once the file has a body, many different types of content – including text, images, and buttons – can be added to the body.
  • 12. SELF-CLOSING TAG • Thus far we have only seen HTML elements with an opening and a closing tag. A few types of elements, however, require only one tag. • Self-closing elements contain all the information the browser needs to render the element inside a single tag. Also, because they are single tags, they cannot wrap around raw text or other elements. • The line break element <br /> is one example of a self-closing tag. You can use it anywhere within your HTML code. The result is a line break in the browser. • Without the break tag, the browser would render line one and line two on the same line.
  • 13. HTML STRUCTURE • HTML documents are organized as a collection of parent-child relationships. When an element is contained inside another element, it is considered the child of that element. The child element is said to be nested inside of the parent element.