SlideShare a Scribd company logo
Fundamentals of
HTML
By-
Syed Abdullah Hassan
Muhammad Zakriya
INTRODUCTION
HTML, which stands for HyperText Markup Language, is the
predominant markup language for web pages. It provides a means to
create structured documents by denoting structure for text such as
headings, paragraphs, lists, links, quotes, and other items. It allows
images and objects to be embedded and can be used to create
interactive forms. It is written in the form of HTML elements
consisting of "tags" surrounded by angle brackets within the web page
content. It can load scripts in languages such as JavaScript which
affect the behavior of HTML webpages. HTML can also be used to
include Cascading Style Sheets (CSS) to define the appearance and
layout of text and other material.
Markup
HTML markup consists of several key components, including elements like tags and their
attributes). Another important component is the document type declaration, which
specifies the Document Type. As of HTML 5, no Document Type Definition will need to be
specified, and will only determine the layout mode.
The Hello world program, a common computer program employed for comparing
programming languages, scripting languages, and markup languages is made of 9 lines of
code in HTML as:
Sample Program
<!doctype html>
<html>
<head>
<title>Hello HTML</title>
</head>
<body>
<p>Hello World!</p>
</body>
</html>
This Document Type Declaration is for HTML 5.
VARIOUS HTML
TAGS
HTML documents are composed entirely of HTML
elements that, in their most general form have three
components: a pair of element tags with a "start tag"
and "end tag"; some element attributes
given to the element within the tags; and finally, all the
actual, textual and graphical[clarification
needed], information content that will be rendered on
the display. An HTML element is everything between
and including the tags.
A common form of an HTML element is:
<tag>content to be rendered</tag>
The name of the HTML element is also the name of the tag.
Note that the end tag's name starts with a slash character,
"/".
The most general form of an HTML element is:
● <h2> Heading Tag </h2> ...
● <b> Bold Tag </b> ...
● <i> Italic Tag </i> ...
0
html tag ( <html> ,
</html> )
All the html documents should contain this
html tags. All the contents should be typed
inside these tags. This forms the base of the
document. It tells the browser where the document
starts and where it stops. Everything in the
document goes inside <HTML>, except that
<!DOCTYPE ...> .
All normal webpages consist of a head and a body.
*The head is used for text and tags that do not show
directly on the page.
*The body is used for text and tags that are shown directly on the
page.
Head and body tags
<html>
<head>
<!-- This section is for the title and technical info of the
page. -->
</head>
<body>
<!-- This section is for all that you want to show on the page.
-->
</body>
</html>
Syntax for head and body tags
HEAD SECTION
The head section of the webpage includes all the
stuff that does not show directly on the resulting
page.
The <title> and </title> tags consists of the title of
your page. The title is what shows in the top of your
browser window when the page is
loaded.
BODY SECTION
The body of the document contains all that can be seen
when the user loads the page.
In the rest of this tutorial you can learn in detail about all
the different aspects of HTML, including:
* Text
* Formatting
* Resizing
* Layout
* Links
* To local pages
* To pages at other sites
* To bookmarks
* Images
* Inserting images (GIF and jpg)
* Adding a link to an image
* Backgrounds
* Colors
* Images
* Fixed Image
* Tables
* Frames
* Forms
* Metatags
* Hexadecimal Colors
fHTML CODE: OUTPUT:
Attributes:
LEFTMARGIN: size of left and right margins
MARGINHEIGHT: size of top and bottom margins
MARGINWIDTH: size of left and right margins
onLoad: Script to run once the page is fully loaded
SCROLL = YES | NO
If the document should have a scroll bar
Anchor Tag & Attributes used with Anchor Tag:
<A ...> is the cornerstone of HTML, the tag that makes
hypertext hypertext. <A ...> is the tag you use to make
hyperlinks: the text that you can click on in your web
browser to go to another web page.
HREF: URL you are linking to
* NAME: name a section of the page
* TARGET: which window the document should go in
* TITLE: suggested title for the document to be opened
* onClick: script to run when the user clicks on this anchor
All the above commands can be used in the tag <a ...>
</A> Closes the anchor
<I>
<I> italicizes the text.
<IMG ...>
<IMG ...> puts an image on the web page. <IMG ...> requires two
attributes: SRC and ALT. ALT is always required in
<IMG ...>
ATTRIBUTES:
SRC: where to get the picture
ALT: text to show if you don't show the picture
WIDTH: how wide is the picture
HEIGHT: how tall is the picture
ALIGN = LEFT | RIGHT | TOP | TEXTTOP | MIDDLE |
BORDER: border around the picture
<B> makes the text bold.
Sample:
I <B>really</B> like this idea.
Output:
I really like this idea.
Button Tag and Attributes:
<BUTTON ...> creates a button. Unlike <INPUT ...>,
<BUTTON ...> is a container which allows you to put regular
HTML contents in the button, including text and pictures.
Unfortunately, <BUTTON ...> does not degrade well, and so at
this time it's best to stick with
<INPUT ...>.
* TYPE: what type of button is this
* onClick: script to run when the user clicks here
* NAME: name of this button element
* VALUE: the value sent with the form
* DISABLED: disable this button
* TABINDEX: tab order
All the above commands can be used in <BUTTON ...>
<FORM ...>
* ACTION: URL of the CGI program
* METHOD: how to transfer the data to the CGI
* NAME: name of this form
* onSubmit: script to run before the form is submitted
* onReset: script to run before the form is reset
<FORM ...> indicates the beginning of a form. All other form tags
go inside
<FORM ...>. In its simplest use, <FORM ...> can be used
without any attributes
HTML (1).pptx

More Related Content

Similar to HTML (1).pptx

Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2
Leo Mark Villar
 
BVK_PTT_HTML-Unit - III (1).pptx
BVK_PTT_HTML-Unit - III (1).pptxBVK_PTT_HTML-Unit - III (1).pptx
BVK_PTT_HTML-Unit - III (1).pptx
panoosha2
 
Web Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTMLWeb Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTML
Der Lo
 
Intro to html
Intro to htmlIntro to html
Intro to html
cherrybear2014
 
introduction to HTML. How to learn HTML coding
introduction to HTML. How to learn HTML codingintroduction to HTML. How to learn HTML coding
introduction to HTML. How to learn HTML coding
meheraf045
 
html tags
html tagshtml tags
html tags
Kunal gupta
 
Html basics
Html basicsHtml basics
Html basics
Ramesh Kumar
 
Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)
ghayour abbas
 
CSE-HTML-PPT.pptx
CSE-HTML-PPT.pptxCSE-HTML-PPT.pptx
CSE-HTML-PPT.pptx
PsKulkarni1
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
BagHarki
 
introdution-to-htmlppt.ppt
introdution-to-htmlppt.pptintrodution-to-htmlppt.ppt
introdution-to-htmlppt.ppt
navyar41
 
Web Development using HTML & CSS
Web Development using HTML & CSSWeb Development using HTML & CSS
Web Development using HTML & CSS
Brainware Consultancy Pvt Ltd
 
Markup language classification, designing static and dynamic
Markup language classification, designing static and dynamicMarkup language classification, designing static and dynamic
Markup language classification, designing static and dynamic
Ankita Bhalla
 
INTERNSHIP PROJECT PPT RAJ HZL.pdf
INTERNSHIP PROJECT PPT RAJ HZL.pdfINTERNSHIP PROJECT PPT RAJ HZL.pdf
INTERNSHIP PROJECT PPT RAJ HZL.pdf
DineshKumar522328
 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to Html
Folasade Adedeji
 
Html basic
Html basicHtml basic
Html basic
Nital Shingala
 
About html
About htmlAbout html
About html
Manvigangwar
 
html complete notes
html complete noteshtml complete notes
html complete notes
onactiontv
 
html compete notes basic to advanced
html compete notes basic to advancedhtml compete notes basic to advanced
html compete notes basic to advanced
virtualworld14
 
introdution-to-html.pptx
introdution-to-html.pptxintrodution-to-html.pptx
introdution-to-html.pptx
datapro2
 

Similar to HTML (1).pptx (20)

Computer fundamentals-internet p2
Computer fundamentals-internet p2Computer fundamentals-internet p2
Computer fundamentals-internet p2
 
BVK_PTT_HTML-Unit - III (1).pptx
BVK_PTT_HTML-Unit - III (1).pptxBVK_PTT_HTML-Unit - III (1).pptx
BVK_PTT_HTML-Unit - III (1).pptx
 
Web Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTMLWeb Development Basics: HOW TO in HTML
Web Development Basics: HOW TO in HTML
 
Intro to html
Intro to htmlIntro to html
Intro to html
 
introduction to HTML. How to learn HTML coding
introduction to HTML. How to learn HTML codingintroduction to HTML. How to learn HTML coding
introduction to HTML. How to learn HTML coding
 
html tags
html tagshtml tags
html tags
 
Html basics
Html basicsHtml basics
Html basics
 
Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)Web Development 1 (HTML & CSS)
Web Development 1 (HTML & CSS)
 
CSE-HTML-PPT.pptx
CSE-HTML-PPT.pptxCSE-HTML-PPT.pptx
CSE-HTML-PPT.pptx
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
 
introdution-to-htmlppt.ppt
introdution-to-htmlppt.pptintrodution-to-htmlppt.ppt
introdution-to-htmlppt.ppt
 
Web Development using HTML & CSS
Web Development using HTML & CSSWeb Development using HTML & CSS
Web Development using HTML & CSS
 
Markup language classification, designing static and dynamic
Markup language classification, designing static and dynamicMarkup language classification, designing static and dynamic
Markup language classification, designing static and dynamic
 
INTERNSHIP PROJECT PPT RAJ HZL.pdf
INTERNSHIP PROJECT PPT RAJ HZL.pdfINTERNSHIP PROJECT PPT RAJ HZL.pdf
INTERNSHIP PROJECT PPT RAJ HZL.pdf
 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to Html
 
Html basic
Html basicHtml basic
Html basic
 
About html
About htmlAbout html
About html
 
html complete notes
html complete noteshtml complete notes
html complete notes
 
html compete notes basic to advanced
html compete notes basic to advancedhtml compete notes basic to advanced
html compete notes basic to advanced
 
introdution-to-html.pptx
introdution-to-html.pptxintrodution-to-html.pptx
introdution-to-html.pptx
 

Recently uploaded

spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
Iris Thiele Isip-Tan
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
PsychoTech Services
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
nitinpv4ai
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
nitinpv4ai
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
nitinpv4ai
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
ImMuslim
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
Celine George
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
Celine George
 

Recently uploaded (20)

spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Educational Technology in the Health Sciences
Educational Technology in the Health SciencesEducational Technology in the Health Sciences
Educational Technology in the Health Sciences
 
Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...Gender and Mental Health - Counselling and Family Therapy Applications and In...
Gender and Mental Health - Counselling and Family Therapy Applications and In...
 
Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)Oliver Asks for More by Charles Dickens (9)
Oliver Asks for More by Charles Dickens (9)
 
Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10Haunted Houses by H W Longfellow for class 10
Haunted Houses by H W Longfellow for class 10
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
Skimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S EliotSkimbleshanks-The-Railway-Cat by T S Eliot
Skimbleshanks-The-Railway-Cat by T S Eliot
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
Geography as a Discipline Chapter 1 __ Class 11 Geography NCERT _ Class Notes...
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17How to Predict Vendor Bill Product in Odoo 17
How to Predict Vendor Bill Product in Odoo 17
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17How Barcodes Can Be Leveraged Within Odoo 17
How Barcodes Can Be Leveraged Within Odoo 17
 

HTML (1).pptx

  • 1. Fundamentals of HTML By- Syed Abdullah Hassan Muhammad Zakriya
  • 2. INTRODUCTION HTML, which stands for HyperText Markup Language, is the predominant markup language for web pages. It provides a means to create structured documents by denoting structure for text such as headings, paragraphs, lists, links, quotes, and other items. It allows images and objects to be embedded and can be used to create interactive forms. It is written in the form of HTML elements consisting of "tags" surrounded by angle brackets within the web page content. It can load scripts in languages such as JavaScript which affect the behavior of HTML webpages. HTML can also be used to include Cascading Style Sheets (CSS) to define the appearance and layout of text and other material.
  • 3. Markup HTML markup consists of several key components, including elements like tags and their attributes). Another important component is the document type declaration, which specifies the Document Type. As of HTML 5, no Document Type Definition will need to be specified, and will only determine the layout mode. The Hello world program, a common computer program employed for comparing programming languages, scripting languages, and markup languages is made of 9 lines of code in HTML as: Sample Program <!doctype html> <html> <head> <title>Hello HTML</title> </head> <body> <p>Hello World!</p> </body> </html> This Document Type Declaration is for HTML 5.
  • 5. HTML documents are composed entirely of HTML elements that, in their most general form have three components: a pair of element tags with a "start tag" and "end tag"; some element attributes given to the element within the tags; and finally, all the actual, textual and graphical[clarification needed], information content that will be rendered on the display. An HTML element is everything between and including the tags.
  • 6. A common form of an HTML element is: <tag>content to be rendered</tag> The name of the HTML element is also the name of the tag. Note that the end tag's name starts with a slash character, "/". The most general form of an HTML element is: ● <h2> Heading Tag </h2> ... ● <b> Bold Tag </b> ... ● <i> Italic Tag </i> ...
  • 7. 0 html tag ( <html> , </html> ) All the html documents should contain this html tags. All the contents should be typed inside these tags. This forms the base of the document. It tells the browser where the document starts and where it stops. Everything in the document goes inside <HTML>, except that <!DOCTYPE ...> .
  • 8. All normal webpages consist of a head and a body. *The head is used for text and tags that do not show directly on the page. *The body is used for text and tags that are shown directly on the page. Head and body tags
  • 9. <html> <head> <!-- This section is for the title and technical info of the page. --> </head> <body> <!-- This section is for all that you want to show on the page. --> </body> </html> Syntax for head and body tags
  • 10. HEAD SECTION The head section of the webpage includes all the stuff that does not show directly on the resulting page. The <title> and </title> tags consists of the title of your page. The title is what shows in the top of your browser window when the page is loaded.
  • 11. BODY SECTION The body of the document contains all that can be seen when the user loads the page. In the rest of this tutorial you can learn in detail about all the different aspects of HTML, including: * Text * Formatting * Resizing * Layout * Links * To local pages * To pages at other sites * To bookmarks
  • 12. * Images * Inserting images (GIF and jpg) * Adding a link to an image * Backgrounds * Colors * Images * Fixed Image * Tables * Frames * Forms * Metatags * Hexadecimal Colors
  • 14. Attributes: LEFTMARGIN: size of left and right margins MARGINHEIGHT: size of top and bottom margins MARGINWIDTH: size of left and right margins onLoad: Script to run once the page is fully loaded SCROLL = YES | NO If the document should have a scroll bar
  • 15. Anchor Tag & Attributes used with Anchor Tag: <A ...> is the cornerstone of HTML, the tag that makes hypertext hypertext. <A ...> is the tag you use to make hyperlinks: the text that you can click on in your web browser to go to another web page. HREF: URL you are linking to * NAME: name a section of the page * TARGET: which window the document should go in * TITLE: suggested title for the document to be opened * onClick: script to run when the user clicks on this anchor All the above commands can be used in the tag <a ...> </A> Closes the anchor
  • 16. <I> <I> italicizes the text. <IMG ...> <IMG ...> puts an image on the web page. <IMG ...> requires two attributes: SRC and ALT. ALT is always required in <IMG ...> ATTRIBUTES: SRC: where to get the picture ALT: text to show if you don't show the picture WIDTH: how wide is the picture HEIGHT: how tall is the picture ALIGN = LEFT | RIGHT | TOP | TEXTTOP | MIDDLE | BORDER: border around the picture
  • 17. <B> makes the text bold. Sample: I <B>really</B> like this idea. Output: I really like this idea.
  • 18. Button Tag and Attributes: <BUTTON ...> creates a button. Unlike <INPUT ...>, <BUTTON ...> is a container which allows you to put regular HTML contents in the button, including text and pictures. Unfortunately, <BUTTON ...> does not degrade well, and so at this time it's best to stick with <INPUT ...>. * TYPE: what type of button is this * onClick: script to run when the user clicks here * NAME: name of this button element * VALUE: the value sent with the form * DISABLED: disable this button * TABINDEX: tab order All the above commands can be used in <BUTTON ...>
  • 19. <FORM ...> * ACTION: URL of the CGI program * METHOD: how to transfer the data to the CGI * NAME: name of this form * onSubmit: script to run before the form is submitted * onReset: script to run before the form is reset <FORM ...> indicates the beginning of a form. All other form tags go inside <FORM ...>. In its simplest use, <FORM ...> can be used without any attributes