SlideShare une entreprise Scribd logo
1  sur  37
Prepared By: Er. Nawaraj
Bhandari
DESIGNING AND DEVELOPING A
WEBSITE
Topic 2:
Introduction to (X)HTML
HTML
• Hyper Text Markup language.
• Markup refers to the sequence of characters that
describes the document’s structure and how the
file should look when it is printed or displayed.
• HTML does not define what a page looks like!
For that we have CSS.
• Extension is html or htm.
• Write code in any text editor (e.g. Notepad,
Notepad++, Dream weaver, etc) and save as
filename.html/htm
• Initially, html deals with only text but now
multimedia too.
• Html is not a case sensitive.
HTML Tags
• The markup indicators are often called "tags."
• Beings with an open angle bracket (<) and ends
with close angle bracket (>).
• e.g. <html>, <head>, <br/>, <table>, etc.
• Two types: -
1. Singular Tag or Empty Elements
• Tag that comes alone, no closing tag.
• It doesn’t contain any content.
• e.g <br />, <hr />, <img />, etc.
HTML Tags
2. Paired Tag
• Tag that needs opening and closing tag.
• e.g. <h1>Welcome to HTML</h1>
• <h1> is opening tag. </h1> is closing tag. “Welcome to
HTML” is content.
• Some paired tags are :
• <body> , <table>, <tr>, <b> , etc.
• Last In First Out (LIFO) concept
• i.e. last tag should be closed first.
My First HTML
My First HTML - Output
HTML Attributes
• Additional information written immediately after
the html tag separated by space is known as
attributes (properties) of tag.
• Attributes are written in following way : name =
"value".
• e.g:-
HTML Section
• Head Section
• Title
• Style
• Script
• Meta
• Body Section
• The body of HTML document contains all
content that is displayed in a browser: text,
images, lists, tables, and more.
Text Styles
• Bold <b>...............</b> /
<strong>..............</strong>
• Italic <i>................</i> /
<em>..................</em>
• Underlined <u>..................</u>
• Superscript <sup> ………</sup>
• Subscript <sub> …………</sub>
Text Styles Example
Source Code
My First HTML
Text Elements
 There are two categories of text element:
1. Block elements
 For marking up large blocks of content such as
headings and paragraphs
 E.g. <h1>, <h2>, <p>, <div>, etc.
2. Inline elements
 For marking up individual words or phrases
 E.g. <strong>, <em>, <span>, etc.
Block Element - Paragraph
(<p>… </p>)
 When a browser
displays a
paragraph, it
adds a new line
before the
paragraph.
 Paragraphs
should not be
nested inside
other
paragraphs
Paragraph Break - Output
Block Elements - Heading
 There are 6 different levels of headings. <h1> to
<h6>.
 The highest level header format is <h1> and the
lowest is <h6> i.e:- font size decreases.
 All the styles appeared in bold face.
 Headings shouldn’t be nested inside other
headings.
Block Elements - Heading
Inline Elements
 Inline elements are used to markup small portions
of text.
 Inline elements must always be nested inside a
block level element.
‘Physical Style’ tags
 HTML has <font> tag to style the text.
 We can specify color, typeface, size of the
text.
 This tag has been ‘deprecated’:
 Will still work in many browsers
 No longer in use
 We shouldn’t use them in our pages!
Inserting Spaces
 Browsers will always truncate spaces in
HTML pages.
 If you write 10 spaces in your text, the
browser will remove 9 of them, before
displaying the page.
 To add spaces to your text, you can use the
&nbsp; character entity.
Character Entities
Result Description Entity Name
< less than &lt;
> greater than &gt;
& ampersand &amp;
¢ cent &cent;
£ pound &pound;
€ euro &euro;
© copyright &copy;
® registered trademark &reg;
™ trademark &trade;
List
1. Unordered List
 Bulleting
 <ul> … </ul>
 each list starts with <li> and ends with </li>
 Attribute of <ul> tag is : type. Its values can be circle,
square, disc.
List
2. Ordered List
 Numbering
 <ol>…</ol>
 each list starts with <li> and ends with </li>
 Attribute of <ol> tag are
a. type. It possible values are ("1", "A", "i", "I", "a")
b. start
List
2. Ordered List
Nesting the List
Task #01
Last Date to Submit :
Send email:
sun2006bhandari@g
mail.com
with your name and
batch
List
3. Definition List
 The <dl> tags define the start and end of the list.
 The <dt> element specifies the definition term.
 The <dd> element specifies the actual definition.
Document Structure
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Add a title here</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>
<body>
<p>Add some content here.</p>
</body>
</html>
Four parts in document structure :
1. document type declaration
2. the root element
3. the head section and
4. the body section.
Document Type Declaration
 The document type declaration specifies the
version of HTML that the page uses.
 This example specifies that the page is written
using a version of HTML called XHTML 1.0 Strict.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Add a title here</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
...
Document Type Declaration
 This is the same document re-
written as HTML 5
 Elements, tags and attributes work
in exactly the same way.
 Different document type declaration
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>Add a title here</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8"
/>
</head>
<body>
<p>Add some content here.</p>
</body>
</html>
Document Type Declaration
 There many different versions of (X)HTML
including:
 HTML 4.01
 XHTML 1.0 Strict
 HTML 5 (not standard yet)
 XHTML is eXtensible HyperText Markup
Language
 It is HTML re-written to conform to the rules of XML.
 It has stricter syntax than HTML.
Which Version of (X)HTML to
Use?
 This module is based around using XHTML
1.0 Strict.
 We will also explore features of the new
HTML5 specification
The Root Element
 The root element <html> encloses all other
elements
 XMLNS attribute
 This specifies the XML namespace for the page.
 lang and xml:lang
 These attributes specify the language used to write the
document.
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
Valid Documents
 There are many specific rules for HTML
 These rules are specified in a Document Type
Definition (DTD)
 The XHTML Strict 1.0 DTD can be viewed at:
http://tinyurl.com/5n5xq
 If an HTML document follows all the rules of the
DTD, it is described as being valid.
 We can check if our web pages are valid using
the W3Cs validation service
http://validator.w3.org/
Why Validate?
 Validating web pages checks we are
using web standards.
 Accessibility
 Support standards compliant browsers
 Support a range of devices
Any Questions???
Topic 2 : Introduction to (X)HTML
References
 XHTML 1.0 Strict Cheat Sheet
 Available at: http://www.w3.org/2010/04/xhtml10-
strict.html
 http://www.w3schools.com/html/html_entities.
asp

Contenu connexe

Tendances (20)

[Basic HTML/CSS] 1. html - basic tags
[Basic HTML/CSS] 1. html - basic tags[Basic HTML/CSS] 1. html - basic tags
[Basic HTML/CSS] 1. html - basic tags
 
HTML
HTMLHTML
HTML
 
Html
HtmlHtml
Html
 
Html
HtmlHtml
Html
 
Html presentation
Html presentationHtml presentation
Html presentation
 
WEB PAGE DESIGN USING HTML
WEB PAGE DESIGN USING HTMLWEB PAGE DESIGN USING HTML
WEB PAGE DESIGN USING HTML
 
Html
HtmlHtml
Html
 
Html 5
Html 5Html 5
Html 5
 
basic introduction of html tags
basic introduction  of html tagsbasic introduction  of html tags
basic introduction of html tags
 
Html training slide
Html training slideHtml training slide
Html training slide
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
Presentation on html, css
Presentation on html, cssPresentation on html, css
Presentation on html, css
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
Html
HtmlHtml
Html
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Learn html Basics
Learn html BasicsLearn html Basics
Learn html Basics
 
Html presentation
Html presentationHtml presentation
Html presentation
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Html basic
Html basicHtml basic
Html basic
 
Html notes
Html notesHtml notes
Html notes
 

Similaire à Introduction to (x)html

Similaire à Introduction to (x)html (20)

Basic HTML
Basic HTMLBasic HTML
Basic HTML
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 
HTML.pdf
HTML.pdfHTML.pdf
HTML.pdf
 
introduction-to-html hyper text markup .ppt
introduction-to-html hyper text markup  .pptintroduction-to-html hyper text markup  .ppt
introduction-to-html hyper text markup .ppt
 
Learning html. (Part- 1)
Learning html. (Part- 1)Learning html. (Part- 1)
Learning html. (Part- 1)
 
Html
HtmlHtml
Html
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
web development.pdf
web development.pdfweb development.pdf
web development.pdf
 
HTML
HTMLHTML
HTML
 
Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.ppt
 
introdution-to-html.pptx
introdution-to-html.pptxintrodution-to-html.pptx
introdution-to-html.pptx
 
Learn html from www
Learn html from wwwLearn html from www
Learn html from www
 
Uta005 lecture2
Uta005 lecture2Uta005 lecture2
Uta005 lecture2
 
FFW Gabrovo PMG - HTML
FFW Gabrovo PMG - HTMLFFW Gabrovo PMG - HTML
FFW Gabrovo PMG - 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 tag html 10 x10 wen liu art 2830
Html tag html 10 x10 wen liu art 2830Html tag html 10 x10 wen liu art 2830
Html tag html 10 x10 wen liu art 2830
 
chapter 4 web authoring unit 4 xml.pptx
chapter 4 web authoring  unit 4 xml.pptxchapter 4 web authoring  unit 4 xml.pptx
chapter 4 web authoring unit 4 xml.pptx
 
HTML
HTMLHTML
HTML
 
HTML/HTML5
HTML/HTML5HTML/HTML5
HTML/HTML5
 
Html starting
Html startingHtml starting
Html starting
 

Plus de Er. Nawaraj Bhandari

Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methodsEr. Nawaraj Bhandari
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data miningEr. Nawaraj Bhandari
 
Mining Association Rules in Large Database
Mining Association Rules in Large DatabaseMining Association Rules in Large Database
Mining Association Rules in Large DatabaseEr. Nawaraj Bhandari
 
Introduction to data mining and data warehousing
Introduction to data mining and data warehousingIntroduction to data mining and data warehousing
Introduction to data mining and data warehousingEr. Nawaraj Bhandari
 
Classification and prediction in data mining
Classification and prediction in data miningClassification and prediction in data mining
Classification and prediction in data miningEr. Nawaraj Bhandari
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionEr. Nawaraj Bhandari
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIEr. Nawaraj Bhandari
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesEr. Nawaraj Bhandari
 
Introduction to Electronic Commerce
Introduction to Electronic CommerceIntroduction to Electronic Commerce
Introduction to Electronic CommerceEr. Nawaraj Bhandari
 
Using macros in microsoft excel part 2
Using macros in microsoft excel   part 2Using macros in microsoft excel   part 2
Using macros in microsoft excel part 2Er. Nawaraj Bhandari
 
Using macros in microsoft excel part 1
Using macros in microsoft excel   part 1Using macros in microsoft excel   part 1
Using macros in microsoft excel part 1Er. Nawaraj Bhandari
 

Plus de Er. Nawaraj Bhandari (20)

Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data mining
 
Mining Association Rules in Large Database
Mining Association Rules in Large DatabaseMining Association Rules in Large Database
Mining Association Rules in Large Database
 
Introduction to data mining and data warehousing
Introduction to data mining and data warehousingIntroduction to data mining and data warehousing
Introduction to data mining and data warehousing
 
Data warehouse testing
Data warehouse testingData warehouse testing
Data warehouse testing
 
Data warehouse physical design
Data warehouse physical designData warehouse physical design
Data warehouse physical design
 
Data warehouse logical design
Data warehouse logical designData warehouse logical design
Data warehouse logical design
 
Classification and prediction in data mining
Classification and prediction in data miningClassification and prediction in data mining
Classification and prediction in data mining
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean Function
 
Chapter 6: Sequential Logic
Chapter 6: Sequential LogicChapter 6: Sequential Logic
Chapter 6: Sequential Logic
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 
Introduction to Electronic Commerce
Introduction to Electronic CommerceIntroduction to Electronic Commerce
Introduction to Electronic Commerce
 
Evaluating software development
Evaluating software developmentEvaluating software development
Evaluating software development
 
Using macros in microsoft excel part 2
Using macros in microsoft excel   part 2Using macros in microsoft excel   part 2
Using macros in microsoft excel part 2
 
Using macros in microsoft excel part 1
Using macros in microsoft excel   part 1Using macros in microsoft excel   part 1
Using macros in microsoft excel part 1
 
Using macros in microsoft access
Using macros in microsoft accessUsing macros in microsoft access
Using macros in microsoft access
 
Testing software development
Testing software developmentTesting software development
Testing software development
 

Dernier

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 

Dernier (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 

Introduction to (x)html

  • 1. Prepared By: Er. Nawaraj Bhandari DESIGNING AND DEVELOPING A WEBSITE Topic 2: Introduction to (X)HTML
  • 2. HTML • Hyper Text Markup language. • Markup refers to the sequence of characters that describes the document’s structure and how the file should look when it is printed or displayed. • HTML does not define what a page looks like! For that we have CSS. • Extension is html or htm. • Write code in any text editor (e.g. Notepad, Notepad++, Dream weaver, etc) and save as filename.html/htm • Initially, html deals with only text but now multimedia too. • Html is not a case sensitive.
  • 3. HTML Tags • The markup indicators are often called "tags." • Beings with an open angle bracket (<) and ends with close angle bracket (>). • e.g. <html>, <head>, <br/>, <table>, etc. • Two types: - 1. Singular Tag or Empty Elements • Tag that comes alone, no closing tag. • It doesn’t contain any content. • e.g <br />, <hr />, <img />, etc.
  • 4. HTML Tags 2. Paired Tag • Tag that needs opening and closing tag. • e.g. <h1>Welcome to HTML</h1> • <h1> is opening tag. </h1> is closing tag. “Welcome to HTML” is content. • Some paired tags are : • <body> , <table>, <tr>, <b> , etc. • Last In First Out (LIFO) concept • i.e. last tag should be closed first.
  • 6. My First HTML - Output
  • 7. HTML Attributes • Additional information written immediately after the html tag separated by space is known as attributes (properties) of tag. • Attributes are written in following way : name = "value". • e.g:-
  • 8. HTML Section • Head Section • Title • Style • Script • Meta • Body Section • The body of HTML document contains all content that is displayed in a browser: text, images, lists, tables, and more.
  • 9. Text Styles • Bold <b>...............</b> / <strong>..............</strong> • Italic <i>................</i> / <em>..................</em> • Underlined <u>..................</u> • Superscript <sup> ………</sup> • Subscript <sub> …………</sub>
  • 13. Text Elements  There are two categories of text element: 1. Block elements  For marking up large blocks of content such as headings and paragraphs  E.g. <h1>, <h2>, <p>, <div>, etc. 2. Inline elements  For marking up individual words or phrases  E.g. <strong>, <em>, <span>, etc.
  • 14. Block Element - Paragraph (<p>… </p>)  When a browser displays a paragraph, it adds a new line before the paragraph.  Paragraphs should not be nested inside other paragraphs
  • 16. Block Elements - Heading  There are 6 different levels of headings. <h1> to <h6>.  The highest level header format is <h1> and the lowest is <h6> i.e:- font size decreases.  All the styles appeared in bold face.  Headings shouldn’t be nested inside other headings.
  • 17. Block Elements - Heading
  • 18. Inline Elements  Inline elements are used to markup small portions of text.  Inline elements must always be nested inside a block level element.
  • 19. ‘Physical Style’ tags  HTML has <font> tag to style the text.  We can specify color, typeface, size of the text.  This tag has been ‘deprecated’:  Will still work in many browsers  No longer in use  We shouldn’t use them in our pages!
  • 20. Inserting Spaces  Browsers will always truncate spaces in HTML pages.  If you write 10 spaces in your text, the browser will remove 9 of them, before displaying the page.  To add spaces to your text, you can use the &nbsp; character entity.
  • 21. Character Entities Result Description Entity Name < less than &lt; > greater than &gt; & ampersand &amp; ¢ cent &cent; £ pound &pound; € euro &euro; © copyright &copy; ® registered trademark &reg; ™ trademark &trade;
  • 22. List 1. Unordered List  Bulleting  <ul> … </ul>  each list starts with <li> and ends with </li>  Attribute of <ul> tag is : type. Its values can be circle, square, disc.
  • 23. List 2. Ordered List  Numbering  <ol>…</ol>  each list starts with <li> and ends with </li>  Attribute of <ol> tag are a. type. It possible values are ("1", "A", "i", "I", "a") b. start
  • 26. Task #01 Last Date to Submit : Send email: sun2006bhandari@g mail.com with your name and batch
  • 27. List 3. Definition List  The <dl> tags define the start and end of the list.  The <dt> element specifies the definition term.  The <dd> element specifies the actual definition.
  • 28. Document Structure <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Add a title here</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> </head> <body> <p>Add some content here.</p> </body> </html> Four parts in document structure : 1. document type declaration 2. the root element 3. the head section and 4. the body section.
  • 29. Document Type Declaration  The document type declaration specifies the version of HTML that the page uses.  This example specifies that the page is written using a version of HTML called XHTML 1.0 Strict. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Add a title here</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> ...
  • 30. Document Type Declaration  This is the same document re- written as HTML 5  Elements, tags and attributes work in exactly the same way.  Different document type declaration <!DOCTYPE HTML> <html lang="en"> <head> <title>Add a title here</title> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> </head> <body> <p>Add some content here.</p> </body> </html>
  • 31. Document Type Declaration  There many different versions of (X)HTML including:  HTML 4.01  XHTML 1.0 Strict  HTML 5 (not standard yet)  XHTML is eXtensible HyperText Markup Language  It is HTML re-written to conform to the rules of XML.  It has stricter syntax than HTML.
  • 32. Which Version of (X)HTML to Use?  This module is based around using XHTML 1.0 Strict.  We will also explore features of the new HTML5 specification
  • 33. The Root Element  The root element <html> encloses all other elements  XMLNS attribute  This specifies the XML namespace for the page.  lang and xml:lang  These attributes specify the language used to write the document. <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  • 34. Valid Documents  There are many specific rules for HTML  These rules are specified in a Document Type Definition (DTD)  The XHTML Strict 1.0 DTD can be viewed at: http://tinyurl.com/5n5xq  If an HTML document follows all the rules of the DTD, it is described as being valid.  We can check if our web pages are valid using the W3Cs validation service http://validator.w3.org/
  • 35. Why Validate?  Validating web pages checks we are using web standards.  Accessibility  Support standards compliant browsers  Support a range of devices
  • 36. Any Questions??? Topic 2 : Introduction to (X)HTML
  • 37. References  XHTML 1.0 Strict Cheat Sheet  Available at: http://www.w3.org/2010/04/xhtml10- strict.html  http://www.w3schools.com/html/html_entities. asp