SlideShare a Scribd company logo
4
Most read
5
Most read
7
Most read
Binalatongan Community College
Brgy. Ilang San Carlos City, Pangasinan
Web Systems and
Technologies 1
MODULE 1
HUMPHREY A. DIAZ
INSTRUCTOR
Module No. 001
Subject Code : Web Systems and Technologies 1
Subject Description : The focus in this course is on the Web Servers and WWW as a
platform for interactive applications, content publishing and social services. The
development of web-based applications requires knowledge about the underlying
technology and the formats and standards the web is based upon. In this course you will
learn about the HTTP communication protocol, the markup languages HTML standards for
formatting and transforming web content, interactive graphics and multimedia content on
the web.
Term : 2nd
Semester 2021-2022
I. Learning Objectives:
- Demonstrate the mastery of the topics presented, knowledge and skills acquired by
performing within good expectations during the Midterm Examination.
- Apply the knowledge and skills earned, and display the knowledge gained during the
entire course by performing within good expectations in the Final Examination.
Upon completion of this module, the students will be able to:
Describe the function of Hypertext Markup Language (HTML) in Web communications.
Describe the function of Cascading Style Sheets (CSS) in Web communications and
describe the relationship between CSS and HTML.
Define the terms "presentational” and "semantic” mean in the context of HTML/CSS
coding.
Describe the role played by hosting services on the Web.
Identify software that can be used to create, maintain, or modify HTML and CSS.
Describe the uses of a Content Management System.
Create empty HTML and CSS files.
Identify the parts of HTML and CSS files.
II. Learning Outcomes:
-Develop skills in analyzing the usability of a web site.
-Understand how to plan and conduct user research related to web usability.
-Learn the language of the web: HTML and CSS.
-Learn CSS grid layout and flexbox.
-Learn techniques of responsive web design, including media queries.
III. Learning Resources:
1. Required Learning Resources
- Learning Modules, Learning Management System
2. Additional Learning Resources
- HTML & CSS: Design and Build Web Sites, Jon Duckett 2018 John Wiley & Sons
Binalatongan Community College
Brgy. Ilang San Carlos City, Pangasinan
IV. Tasks to Complete:
- Complete the activities and quizzes included on the module by performing within good
expectations.
- Apply the knowledge and skills earned, and display the knowledge gained during the
entire course by performing within good expectations in Midterm and Final Examinations.
V. Content Items:
- Lesson 1: HTML Introduction
- Lesson 2: HTML Editors
- Lesson 3: HTML Elements
- Lesson 4: HTML Attributes
VI. Summary:
- This module provides the fundamental principles that guides students to their learning.
- The module is the intellectually disciplined process of actively and skillfully conceptualizing,
applying, analyzing, synthesizing, and/or evaluating information gathered from, or generated
by, observation, experience, reflection, reasoning, or communication, as a guide to belief and
action.
VII. Assessments:
- To evaluate the students, the module provides some activities, exercises, self-checks and
quizzes. Examinations will be conducted at home.
HTML Introduction
LESSON 1: HTML Introduction
HTML is the standard markup language for creating Web pages.
What is HTML?
• HTML stands for Hyper Text Markup Language
• HTML is the standard markup language for creating Web pages
• HTML describes the structure of a Web page
• HTML consists of a series of elements
• HTML elements tell the browser how to display the content
• HTML elements label pieces of content such as "this is a heading", "this is a paragraph",
"this is a link", etc.
A Simple HTML Document
Example Explained
• The <!DOCTYPE html> declaration defines that this document is an HTML5 document
• The <html> element is the root element of an HTML page
• The <head> element contains meta information about the HTML page
• The <title> element specifies a title for the HTML page (which is shown in the browser's
title bar or in the page's tab)
• The <body> element defines the document's body, and is a container for all the visible
contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc.
• The <h1> element defines a large heading
• The <p> element defines a paragraph
What is an HTML Element?
An HTML element is defined by a start tag, some content, and an end tag:
<tagname> Content goes here... </tagname>
The HTML element is everything from the start tag to the end tag:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
Start tag Element content End tag
<h1> My First Heading </h1>
<p> My first paragraph. </p>
<br> none none
Note: Some HTML elements have no content (like the <br> element). These elements are called
empty elements. Empty elements do not have an end tag!
Web Browsers
The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and
display them correctly.
A browser does not display the HTML tags, but uses them to determine how to display the
document:
HTML Page Structure
Below is a visualization of an HTML page structure:
Note: The content inside the <body> section (the white area above) will be displayed in a browser.
The content inside the <title> element will be shown in the browser's title bar or in the page's tab.
HTML Editors
LESSON 2: HTML Editors
A simple text editor is all you need to learn HTML.
Learn HTML Using Notepad or TextEdit
Web pages can be created and modified by using professional HTML editors.
However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit
(Mac).
We believe in that using a simple text editor is a good way to learn HTML.
Follow the steps below to create your first web page with Notepad or TextEdit.
Step 1: Open Notepad (PC)
Windows 10 or later:
Open the Start Screen (the window symbol at the bottom left on your screen). Type Notepad.
Step 2: Write Some HTML
Write or copy the following HTML code into Notepad:
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Step 3: Save the HTML Page
Save the file on your computer. Select File > Save as in the Notepad menu.
Name the file "index.html" and set the encoding to UTF-8 (which is the preferred encoding for
HTML files).
Step 4: View the HTML Page in Your Browser
Open the saved HTML file in your favorite browser (double click on the file, or right-click - and
choose "Open with").
The result will look much like this:
HTML Basic Examples
LESSON 3: HTML Basic Examples
In this chapter we will show some basic HTML examples.
Don't worry if we use tags you have not learned about yet.
HTML Documents
All HTML documents must start with a document type declaration: <!DOCTYPE html>.
The HTML document itself begins with <html> and ends with </html>.
The visible part of the HTML document is between <body> and </body>.
The <!DOCTYPE> Declaration
The <!DOCTYPE> declaration represents the document type, and helps browsers to display web
pages correctly.
It must only appear once, at the top of the page (before any HTML tags).
The <!DOCTYPE> declaration is not case sensitive.
The <!DOCTYPE> declaration for HTML5 is:
HTML Headings
HTML headings are defined with the <h1> to <h6> tags.
<h1> defines the most important heading. <h6> defines the least important heading:
HTML Paragraphs
HTML paragraphs are defined with the <p> tag:
HTML Links
HTML links are defined with the <a> tag:
HTML Images
HTML images are defined with the <img> tag.
The source file (src), alternative text (alt), width, and height are provided as attributes:
HTML Elements
LESSON 3: HTML Elements
An HTML element is defined by a start tag, some content, and an end tag.
The HTML element is everything from the start tag to the end tag:
<tagname>Content goes here...</tagname>
Examples of some HTML elements:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
Start tag Element content End tag
<h1> My First Heading </h1>
<p> My first paragraph. </p>
<br> none none
Note: Some HTML elements have no content (like the <br> element). These elements are called
empty elements. Empty elements do not have an end tag!
Nested HTML Elements
HTML elements can be nested (this means that elements can contain other elements).
All HTML documents consist of nested HTML elements.
The following example contains four HTML elements (<html>, <body>, <h1> and <p>):
Example Explained
The <html> element is the root element and it defines the whole HTML document.
It has a start tag <html> and an end tag </html>.
Then, inside the <html> element there is a <body> element:
The <body> element defines the document's body.
It has a start tag <body> and an end tag </body>.
Then, inside the <body> element there are two other elements: <h1> and <p>:
The <h1> element defines a heading.
It has a start tag <h1> and an end tag </h1>:
The <p> element defines a paragraph.
It has a start tag <p> and an end tag </p>:
Never Skip the End Tag
Some HTML elements will display correctly, even if you forget the end tag:
Output:
HTML Attributes
LESSON 4: HTML Attributes
HTML attributes provide additional information about HTML elements.
HTML Attributes
• All HTML elements can have attributes
• Attributes provide additional information about elements
• Attributes are always specified in the start tag
• Attributes usually come in name/value pairs like: name="value"
The href Attribute
The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link goes to:
Output:
The src Attribute
The <img> tag is used to embed an image in an HTML page. The src attribute specifies the path to
the image to be displayed:
The width and height Attributes
The <img> tag should also contain the width and height attributes, which specifies the width and
height of the image (in pixels):

More Related Content

DOCX
Seminar
Umm-e-Rooman Yaqoob
 
PDF
English K to 12 Curriculum Guide
Dr. Joy Kenneth Sala Biasong
 
PPTX
Communication and globalization
EliasTaragua
 
DOCX
Unit 3
RameshkumarM15
 
PPTX
S1_SD_Resources Walkthrough.pptx
LAZAROAREVALO1
 
PPTX
Career guidance ppt(rubeena)
Ruby Research Labs
 
PPTX
Citizenship
titserRex
 
PPTX
Word processing
himabindukursam
 
English K to 12 Curriculum Guide
Dr. Joy Kenneth Sala Biasong
 
Communication and globalization
EliasTaragua
 
Unit 3
RameshkumarM15
 
S1_SD_Resources Walkthrough.pptx
LAZAROAREVALO1
 
Career guidance ppt(rubeena)
Ruby Research Labs
 
Citizenship
titserRex
 
Word processing
himabindukursam
 

What's hot (20)

PPTX
Introduction to HTML
Ann Alcid
 
PDF
HTML PPT.pdf
sunnyGupta325328
 
PPTX
Html
Nisa Soomro
 
PPTX
HTML
chinesebilli
 
PPTX
Basic HTML
Sayan De
 
PPTX
HTML (Web) basics for a beginner
Jayapal Reddy Nimmakayala
 
PPTX
HTML-(workshop)7557.pptx
Raja980775
 
PPTX
Html ppt
santosh lamba
 
PPT
html tags
YogeshDhamke2
 
PPT
Hyperlinks in HTML
Aarti P
 
PPT
cascading style sheet ppt
abhilashagupta
 
ODP
HTML5
Hatem Mahmoud
 
PDF
Basic Html Notes
NextGenr
 
PPT
Bootstrap Part - 1
EPAM Systems
 
PPTX
Links in Html
sadeenedian08
 
PPTX
Pagemaker
ThamizhselviKrishnam
 
PPTX
Basic Html Knowledge for students
vethics
 
PPSX
Html introduction
Dalia Elbadry
 
PPT
Cascading Style Sheets
Marc Steel
 
PPTX
Web Page Designing
Amit Mali
 
Introduction to HTML
Ann Alcid
 
HTML PPT.pdf
sunnyGupta325328
 
Html
Nisa Soomro
 
HTML
chinesebilli
 
Basic HTML
Sayan De
 
HTML (Web) basics for a beginner
Jayapal Reddy Nimmakayala
 
HTML-(workshop)7557.pptx
Raja980775
 
Html ppt
santosh lamba
 
html tags
YogeshDhamke2
 
Hyperlinks in HTML
Aarti P
 
cascading style sheet ppt
abhilashagupta
 
HTML5
Hatem Mahmoud
 
Basic Html Notes
NextGenr
 
Bootstrap Part - 1
EPAM Systems
 
Links in Html
sadeenedian08
 
Basic Html Knowledge for students
vethics
 
Html introduction
Dalia Elbadry
 
Cascading Style Sheets
Marc Steel
 
Web Page Designing
Amit Mali
 
Ad

Similar to Module 1 - Introduction to HTML.pdf (20)

PDF
Html tutorial
Hassan Nasir
 
PDF
Html tutorial
FLYMAN TECHNOLOGY LIMITED
 
PDF
Html tutorial
Vinay Vinnu
 
DOCX
HTML Notes And Some Attributes
HIFZUR RAHMAN
 
PDF
Html - Tutorial
adelaticleanu
 
PPTX
HTML5 Topic 1
Juvywen
 
PDF
Web Engineering, Web design, development-2
zabulsfp
 
PDF
"Innovative Web Design & Development Hub
kyereernest560
 
PPTX
html (1) (1).pptx for all students to learn
aveshgopalJonnadula
 
PPTX
html.pptx class notes to prepare html completly
mamathapragada
 
PDF
Let me design
Anurag Deb
 
PPTX
Web_Devp_HTML_CSS00jfhfghhdf0000000.pptx
gauravpurola
 
PPTX
About html
Manvigangwar
 
PPTX
HTML web design_ an introduction to design
SureshSingh142
 
PPTX
POLITEKNIK MALAYSIA
Aiman Hud
 
PPTX
4. html css-java script-basics
Nikita Garg
 
PPTX
4. html css-java script-basics
Minea Chem
 
PPTX
4. html css-java script-basics
xu fag
 
PDF
WEB PROGRAMMING bharathiar university bca unitII
VinodhiniRavi2
 
PPT
CreatingWebPages-Part1.ppt
HamzaAhmad861123
 
Html tutorial
Hassan Nasir
 
Html tutorial
FLYMAN TECHNOLOGY LIMITED
 
Html tutorial
Vinay Vinnu
 
HTML Notes And Some Attributes
HIFZUR RAHMAN
 
Html - Tutorial
adelaticleanu
 
HTML5 Topic 1
Juvywen
 
Web Engineering, Web design, development-2
zabulsfp
 
"Innovative Web Design & Development Hub
kyereernest560
 
html (1) (1).pptx for all students to learn
aveshgopalJonnadula
 
html.pptx class notes to prepare html completly
mamathapragada
 
Let me design
Anurag Deb
 
Web_Devp_HTML_CSS00jfhfghhdf0000000.pptx
gauravpurola
 
About html
Manvigangwar
 
HTML web design_ an introduction to design
SureshSingh142
 
POLITEKNIK MALAYSIA
Aiman Hud
 
4. html css-java script-basics
Nikita Garg
 
4. html css-java script-basics
Minea Chem
 
4. html css-java script-basics
xu fag
 
WEB PROGRAMMING bharathiar university bca unitII
VinodhiniRavi2
 
CreatingWebPages-Part1.ppt
HamzaAhmad861123
 
Ad

Recently uploaded (20)

PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Revolutionize Operations with Intelligent IoT Monitoring and Control
Rejig Digital
 
PPTX
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
Captain IT
 
DOCX
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Make GenAI investments go further with the Dell AI Factory - Infographic
Principled Technologies
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PDF
Software Development Company | KodekX
KodekX
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
Doc9.....................................
SofiaCollazos
 
Revolutionize Operations with Intelligent IoT Monitoring and Control
Rejig Digital
 
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
Captain IT
 
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Make GenAI investments go further with the Dell AI Factory - Infographic
Principled Technologies
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
Software Development Company | KodekX
KodekX
 

Module 1 - Introduction to HTML.pdf

  • 1. Binalatongan Community College Brgy. Ilang San Carlos City, Pangasinan Web Systems and Technologies 1 MODULE 1 HUMPHREY A. DIAZ INSTRUCTOR
  • 2. Module No. 001 Subject Code : Web Systems and Technologies 1 Subject Description : The focus in this course is on the Web Servers and WWW as a platform for interactive applications, content publishing and social services. The development of web-based applications requires knowledge about the underlying technology and the formats and standards the web is based upon. In this course you will learn about the HTTP communication protocol, the markup languages HTML standards for formatting and transforming web content, interactive graphics and multimedia content on the web. Term : 2nd Semester 2021-2022 I. Learning Objectives: - Demonstrate the mastery of the topics presented, knowledge and skills acquired by performing within good expectations during the Midterm Examination. - Apply the knowledge and skills earned, and display the knowledge gained during the entire course by performing within good expectations in the Final Examination. Upon completion of this module, the students will be able to: Describe the function of Hypertext Markup Language (HTML) in Web communications. Describe the function of Cascading Style Sheets (CSS) in Web communications and describe the relationship between CSS and HTML. Define the terms "presentational” and "semantic” mean in the context of HTML/CSS coding. Describe the role played by hosting services on the Web. Identify software that can be used to create, maintain, or modify HTML and CSS. Describe the uses of a Content Management System. Create empty HTML and CSS files. Identify the parts of HTML and CSS files. II. Learning Outcomes: -Develop skills in analyzing the usability of a web site. -Understand how to plan and conduct user research related to web usability. -Learn the language of the web: HTML and CSS. -Learn CSS grid layout and flexbox. -Learn techniques of responsive web design, including media queries. III. Learning Resources: 1. Required Learning Resources - Learning Modules, Learning Management System 2. Additional Learning Resources - HTML & CSS: Design and Build Web Sites, Jon Duckett 2018 John Wiley & Sons Binalatongan Community College Brgy. Ilang San Carlos City, Pangasinan
  • 3. IV. Tasks to Complete: - Complete the activities and quizzes included on the module by performing within good expectations. - Apply the knowledge and skills earned, and display the knowledge gained during the entire course by performing within good expectations in Midterm and Final Examinations. V. Content Items: - Lesson 1: HTML Introduction - Lesson 2: HTML Editors - Lesson 3: HTML Elements - Lesson 4: HTML Attributes VI. Summary: - This module provides the fundamental principles that guides students to their learning. - The module is the intellectually disciplined process of actively and skillfully conceptualizing, applying, analyzing, synthesizing, and/or evaluating information gathered from, or generated by, observation, experience, reflection, reasoning, or communication, as a guide to belief and action. VII. Assessments: - To evaluate the students, the module provides some activities, exercises, self-checks and quizzes. Examinations will be conducted at home.
  • 4. HTML Introduction LESSON 1: HTML Introduction HTML is the standard markup language for creating Web pages. What is HTML? • HTML stands for Hyper Text Markup Language • HTML is the standard markup language for creating Web pages • HTML describes the structure of a Web page • HTML consists of a series of elements • HTML elements tell the browser how to display the content • HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc. A Simple HTML Document Example Explained • The <!DOCTYPE html> declaration defines that this document is an HTML5 document • The <html> element is the root element of an HTML page • The <head> element contains meta information about the HTML page • The <title> element specifies a title for the HTML page (which is shown in the browser's title bar or in the page's tab) • The <body> element defines the document's body, and is a container for all the visible contents, such as headings, paragraphs, images, hyperlinks, tables, lists, etc. • The <h1> element defines a large heading • The <p> element defines a paragraph
  • 5. What is an HTML Element? An HTML element is defined by a start tag, some content, and an end tag: <tagname> Content goes here... </tagname> The HTML element is everything from the start tag to the end tag: <h1>My First Heading</h1> <p>My first paragraph.</p> Start tag Element content End tag <h1> My First Heading </h1> <p> My first paragraph. </p> <br> none none Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag! Web Browsers The purpose of a web browser (Chrome, Edge, Firefox, Safari) is to read HTML documents and display them correctly. A browser does not display the HTML tags, but uses them to determine how to display the document:
  • 6. HTML Page Structure Below is a visualization of an HTML page structure: Note: The content inside the <body> section (the white area above) will be displayed in a browser. The content inside the <title> element will be shown in the browser's title bar or in the page's tab. HTML Editors LESSON 2: HTML Editors A simple text editor is all you need to learn HTML. Learn HTML Using Notepad or TextEdit Web pages can be created and modified by using professional HTML editors. However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac). We believe in that using a simple text editor is a good way to learn HTML. Follow the steps below to create your first web page with Notepad or TextEdit.
  • 7. Step 1: Open Notepad (PC) Windows 10 or later: Open the Start Screen (the window symbol at the bottom left on your screen). Type Notepad. Step 2: Write Some HTML Write or copy the following HTML code into Notepad: <!DOCTYPE html> <html> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html> Step 3: Save the HTML Page Save the file on your computer. Select File > Save as in the Notepad menu. Name the file "index.html" and set the encoding to UTF-8 (which is the preferred encoding for HTML files).
  • 8. Step 4: View the HTML Page in Your Browser Open the saved HTML file in your favorite browser (double click on the file, or right-click - and choose "Open with"). The result will look much like this: HTML Basic Examples LESSON 3: HTML Basic Examples In this chapter we will show some basic HTML examples. Don't worry if we use tags you have not learned about yet. HTML Documents All HTML documents must start with a document type declaration: <!DOCTYPE html>. The HTML document itself begins with <html> and ends with </html>. The visible part of the HTML document is between <body> and </body>.
  • 9. The <!DOCTYPE> Declaration The <!DOCTYPE> declaration represents the document type, and helps browsers to display web pages correctly. It must only appear once, at the top of the page (before any HTML tags). The <!DOCTYPE> declaration is not case sensitive. The <!DOCTYPE> declaration for HTML5 is: HTML Headings HTML headings are defined with the <h1> to <h6> tags. <h1> defines the most important heading. <h6> defines the least important heading:
  • 10. HTML Paragraphs HTML paragraphs are defined with the <p> tag: HTML Links HTML links are defined with the <a> tag: HTML Images HTML images are defined with the <img> tag. The source file (src), alternative text (alt), width, and height are provided as attributes: HTML Elements LESSON 3: HTML Elements An HTML element is defined by a start tag, some content, and an end tag. The HTML element is everything from the start tag to the end tag: <tagname>Content goes here...</tagname> Examples of some HTML elements: <h1>My First Heading</h1> <p>My first paragraph.</p>
  • 11. Start tag Element content End tag <h1> My First Heading </h1> <p> My first paragraph. </p> <br> none none Note: Some HTML elements have no content (like the <br> element). These elements are called empty elements. Empty elements do not have an end tag! Nested HTML Elements HTML elements can be nested (this means that elements can contain other elements). All HTML documents consist of nested HTML elements. The following example contains four HTML elements (<html>, <body>, <h1> and <p>): Example Explained The <html> element is the root element and it defines the whole HTML document. It has a start tag <html> and an end tag </html>. Then, inside the <html> element there is a <body> element:
  • 12. The <body> element defines the document's body. It has a start tag <body> and an end tag </body>. Then, inside the <body> element there are two other elements: <h1> and <p>: The <h1> element defines a heading. It has a start tag <h1> and an end tag </h1>: The <p> element defines a paragraph. It has a start tag <p> and an end tag </p>: Never Skip the End Tag Some HTML elements will display correctly, even if you forget the end tag: Output:
  • 13. HTML Attributes LESSON 4: HTML Attributes HTML attributes provide additional information about HTML elements. HTML Attributes • All HTML elements can have attributes • Attributes provide additional information about elements • Attributes are always specified in the start tag • Attributes usually come in name/value pairs like: name="value" The href Attribute The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link goes to: Output: The src Attribute The <img> tag is used to embed an image in an HTML page. The src attribute specifies the path to the image to be displayed: The width and height Attributes The <img> tag should also contain the width and height attributes, which specifies the width and height of the image (in pixels):