SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Introduction to XHTML



            Chapter 2
Learning Outcomes
   In this chapter, you will learn about:
    ◦ XHTML syntax, tags, and document type
      definitions
    ◦ The anatomy of a web page
    ◦ Formatting the body of a web page
    ◦ Formatting the text on a web page
    ◦ Special Characters
    ◦ Connecting Web pages using hyperlinks
What is HTML?

   HTML:
    The set of markup symbols or codes
    placed in a file intended for display on a
    Web browser page.

   The World Wide Web Consortium
    (http://w3c.org) sets the standards for
    HTML and its related languages.
What is XHTML?
 The newest version of HTML
 eXtensible HyperText Markup
  Language.

   XHTML uses:
    ◦ the elements and attributes of HTML
    ◦ the syntax of XML (eXtensible Markup
      Language).
XML Syntax
   An XML document must be well-formed.
    ◦ Use lowercase
    ◦ Use opening and closing tags
    <body>      </body>
    ◦ Close stand-alone tag with special syntax
    <hr />
First Web page
Document
Type Definition (DTD)
     W3C Recommendation:
      Use a Document Type Definition to identify the
      type of markup language used in a web page.
XHTML 1.0 Transitional
This is the least strict specification for XHTML 1.0. It allows the
use of both Cascading Style Sheets and traditional formatting
instructions such as fonts.

XHTML 1.0 Strict
Requires exclusive use of Cascading Style Sheets.

XHTML 1.0 Frameset
Required for pages using XHTML frames. We will use not use
this.
Head & Body Sections
   Head Section
    Contains information that describes the Web
    page document
    <head>
    …head section info goes here
    </head>
   Body Section
    Contains text and elements that display in the
    Web page document
    <body>
    …body section info goes here
    </body>
Anatomy of an XHTML Element

Opening tag
<h1>content</h1>
                         Closing Tag


The closing tag always needs a slash
        before the tag name.
XHTML Attributes
    Attributes always go inside the
     opening tag.

<h1 id=“blah” class=“big”>
       content</h1>

 Tags can have multiple attributes,
    each separated by a space.
XHTML Elements
 Top-level elements: html, head, and
  body
 Head elements: title, meta and script
 Body elements:
    ◦ Block-Level elements
    ◦ Inline elements
XHTML
                             <title> and <meta /> tags

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title>My First Web Page</title>
    <meta name="description" content="Latest sports news and live scores
   from Yahoo! Eurosport UK. Complete sport coverage with Football
   results, Cricket scores, F1, Golf, Rugby, Tennis and more.">
   <meta name="keywords" content="eurosport,sports, sport,sports
   news,live scores,football,cricket,f1, golf,rugby,tennis,uk,yahoo">
   </head>
   <body>
  .... Body info goes here
   </body>
</html>
The Heading Element

<h1>Heading Level 1</h1>
<h2>Heading Level 2</h2>
<h3>Heading Level 3</h3>
<h4>Heading Level 4</h4>
<h5>Heading Level 5</h5>
<h6>Heading Level 6</h6>
XHTML
                                      <p> tag
Paragraph element
<p> …paragraph goes here… </p>

    ◦ Groups sentences and sections of text
      together.

    ◦ Configures a blank line above and below
      the paragraph
XHTML
                                   <br /> tag
   Line Break element
    ◦ Stand-alone tag

    …text goes here <br />
     This starts on a new line….

    ◦ Causes the next element or text to display
      on a new line
XHTML
                         Special Characters
   Display special characters such as quotes,
    copyright symbol, etc.

       Character           Code
          ©                &copy;
          <                &lt;
          >                &gt;
          &                &amp;
                           &nbsp;
XHTML List Basics
  Definition List
  Ordered List
  Unordered List
XHTML
                                           Definition List
   Useful to display a list of terms and definitions
    or a list of FAQ and answers

    ◦ <dl> tag
      Contains the definition list

    ◦ <dt> tag
      Contains a defined term
      Configures a line break above and below the text

    ◦ <dd> tag
      Contains a data definition or description
      Indents the text
XHTML
                                        Ordered List
 Conveys information in an ordered fashion
 <ol>
    Contains the ordered list
    ◦ type attribute determines numbering scheme of list,
      default is numerals
   <li>
    Contains an item in the list
XHTML
                Ordered List Example
<ol>
 <li>Apply to school</li>
 <li>Register for course</li>
 <li>Pay tuition</li>
 <li>Attend course</li>
</ol>
XHTML
           Unordered List Example
<ul>
 <li>TCP</li>
 <li>IP</li>
 <li>HTTP</li>
 <li>FTP</li>
</ul>
Checkpoint


   Describe the features of a heading tag
    and how it configures the text.
XHTML
                                              <a> tag
   The anchor element
    ◦ Specifies a hyperlink reference (href) to a file
    ◦ Text between the <a> and </a> is displayed on the
      web page.

    <a href="contact.html">Contact Us</a>
    ◦ href Attribute
       Indicates the file name or URL
        Web page document, photo, pdf, etc.




                                                          23
XHTML
                                       <a> tag
   Absolute link
    ◦ Link to other Web sites
    <a href="http://yahoo.com">Yahoo</a>

   Relative link
    ◦ Link to pages on your own site

    <a href="index.htm">Home</a>


                                             24
More on
Relative Linking

     Relative links from the
     home page:
     index.html




         <a href="contact.html">Contact</a>
         <a href="products/collars.html">Collars</a>
         <a href="../index.html">Home</a>
         <a href="../services/bathing.html">Dog Bathing</a>


                                                          25
Opening a Link
in a New Browser Window
   The target attribute on the anchor element
    opens a link in a new browser window or new
    browser tab.

    <a href="http://yahoo.com"
    target="_blank">Yahoo!</a>




                                                  26
XHTML Linking to Fragment Identifiers
       A link to a part of a Web page
       Also called named fragments, fragment ids
       Two components:
          1. The element that identifies the named fragment of a
             Web page. This requires the id attribute.
                     <div id=“top”> ….. </div>
          2. The anchor tag that links to the named fragment of a
             Web page. This uses the href attribute.
                      <a href=“#top”>Back to Top</a>


               Note the use of the # in the anchor tag!
                                                                27
Checkpoint


   Describe when to use an absolute link.
    Is the http protocol used in the href value?

   Describe when to use a relative link. Is the
    http protocol used in the href value?




                                                   28
Writing Valid XHTML
   Check your code for syntax errors
    ◦ Benefit:
       Valid code 
        more consistent browser display

   W3C XHTML Validation Tool
    ◦ http://validator.w3.org
Summary
   This chapter provided an introduction to
    XHTML.
   It began with an introduction to the HTML,
    discussed the transition to XHTML, continued
    with the anatomy of a web page, introduced
    inline and block-level formatting, and
    demonstrated the XHTML techniques used to
    create hyperlinks.
   You will use these skills over and over again as
    you create Web pages.

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Web html table tags
Web html  table tagsWeb html  table tags
Web html table tags
 
Html form tag
Html form tagHtml form tag
Html form tag
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
HTML (Web) basics for a beginner
HTML (Web) basics for a beginnerHTML (Web) basics for a beginner
HTML (Web) basics for a beginner
 
Span and Div tags in HTML
Span and Div tags in HTMLSpan and Div tags in HTML
Span and Div tags in HTML
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
 
Xhtml
XhtmlXhtml
Xhtml
 
How to learn HTML in 10 Days
How to learn HTML in 10 DaysHow to learn HTML in 10 Days
How to learn HTML in 10 Days
 
Html Frames
Html FramesHtml Frames
Html Frames
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Xml
XmlXml
Xml
 
Links in Html
Links in HtmlLinks in Html
Links in Html
 
Xhtml
XhtmlXhtml
Xhtml
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
Learn html Basics
Learn html BasicsLearn html Basics
Learn html Basics
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Introduction to JavaScript (1).ppt
Introduction to JavaScript (1).pptIntroduction to JavaScript (1).ppt
Introduction to JavaScript (1).ppt
 

Andere mochten auch (10)

Xhtml
XhtmlXhtml
Xhtml
 
Dhtml
DhtmlDhtml
Dhtml
 
XHTML
XHTMLXHTML
XHTML
 
Dhtml
DhtmlDhtml
Dhtml
 
Dynamic HTML
Dynamic HTMLDynamic HTML
Dynamic HTML
 
JSON: The Basics
JSON: The BasicsJSON: The Basics
JSON: The Basics
 
Dynamic HTML (DHTML)
Dynamic HTML (DHTML)Dynamic HTML (DHTML)
Dynamic HTML (DHTML)
 
Js ppt
Js pptJs ppt
Js ppt
 
Json
JsonJson
Json
 
Java script ppt
Java script pptJava script ppt
Java script ppt
 

Ähnlich wie Introduction to XHTML - Key Concepts in 40 Characters

Ähnlich wie Introduction to XHTML - Key Concepts in 40 Characters (20)

Chapter2
Chapter2Chapter2
Chapter2
 
Web technology
Web technologyWeb technology
Web technology
 
Eye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easilyEye catching HTML BASICS tips: Learn easily
Eye catching HTML BASICS tips: Learn easily
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
3 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp023 1-html-fundamentals-110302100520-phpapp02
3 1-html-fundamentals-110302100520-phpapp02
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
HTML.pptx
HTML.pptxHTML.pptx
HTML.pptx
 
Html5 css3
Html5 css3Html5 css3
Html5 css3
 
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvvLecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
Lecture 2 HTML part 1.pptxLecture 10 CSS part 2.pptxvvvvvvvvvvvvvv
 
Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3Intr to-html-xhtml-1233508169541646-3
Intr to-html-xhtml-1233508169541646-3
 
Web Page Designing
Web Page DesigningWeb Page Designing
Web Page Designing
 
Html Workshop
Html WorkshopHtml Workshop
Html Workshop
 
Class2
Class2Class2
Class2
 
Html 1
Html 1Html 1
Html 1
 
Html-meeting1-1.pptx
Html-meeting1-1.pptxHtml-meeting1-1.pptx
Html-meeting1-1.pptx
 
HTML 5
HTML 5HTML 5
HTML 5
 
WT Module-1.pdf
WT Module-1.pdfWT Module-1.pdf
WT Module-1.pdf
 
Introduction to HTML.pptx
Introduction to HTML.pptxIntroduction to HTML.pptx
Introduction to HTML.pptx
 
Html
HtmlHtml
Html
 
HTML and CSS Basics
HTML and CSS BasicsHTML and CSS Basics
HTML and CSS Basics
 

Mehr von Hend Al-Khalifa

أساسيات النشر العلمي
أساسيات النشر العلميأساسيات النشر العلمي
أساسيات النشر العلميHend Al-Khalifa
 
عشرة أسئلة تمشكل الباحثين
عشرة أسئلة تمشكل الباحثينعشرة أسئلة تمشكل الباحثين
عشرة أسئلة تمشكل الباحثينHend Al-Khalifa
 
A Survey of IT Jobs in the Kingdom of Saudi Arabia 2017
A Survey of IT Jobs in the Kingdom of Saudi Arabia 2017A Survey of IT Jobs in the Kingdom of Saudi Arabia 2017
A Survey of IT Jobs in the Kingdom of Saudi Arabia 2017Hend Al-Khalifa
 
How to search isi for Quartiles
How to search isi for QuartilesHow to search isi for Quartiles
How to search isi for QuartilesHend Al-Khalifa
 
مقدمة في بناء الأنطولوجيا باستخدام برنامج البورتجي
مقدمة في بناء الأنطولوجيا باستخدام برنامج البورتجيمقدمة في بناء الأنطولوجيا باستخدام برنامج البورتجي
مقدمة في بناء الأنطولوجيا باستخدام برنامج البورتجيHend Al-Khalifa
 
صندوق أدوات البحث العلمي
صندوق أدوات البحث العلميصندوق أدوات البحث العلمي
صندوق أدوات البحث العلميHend Al-Khalifa
 
Mediterranean Arabic Language and Speech Technology Resources
Mediterranean Arabic Language and Speech Technology ResourcesMediterranean Arabic Language and Speech Technology Resources
Mediterranean Arabic Language and Speech Technology ResourcesHend Al-Khalifa
 
توجهات تقنية مبتكرة في التعلم الإلكتروني: من التقليدية للإبداعية
توجهات تقنية مبتكرة في التعلم الإلكتروني: من التقليدية للإبداعيةتوجهات تقنية مبتكرة في التعلم الإلكتروني: من التقليدية للإبداعية
توجهات تقنية مبتكرة في التعلم الإلكتروني: من التقليدية للإبداعيةHend Al-Khalifa
 
كتيب ورشة السجل البحثي
كتيب ورشة السجل البحثيكتيب ورشة السجل البحثي
كتيب ورشة السجل البحثيHend Al-Khalifa
 
CS4HS Booklet- In Arabic
CS4HS Booklet- In ArabicCS4HS Booklet- In Arabic
CS4HS Booklet- In ArabicHend Al-Khalifa
 
Website Development Process
Website Development ProcessWebsite Development Process
Website Development ProcessHend Al-Khalifa
 
MoM2010: Data mining as an Saudi IT nation demand
MoM2010: Data mining as an Saudi IT nation demandMoM2010: Data mining as an Saudi IT nation demand
MoM2010: Data mining as an Saudi IT nation demandHend Al-Khalifa
 
MoM2010: Saudi Commission for Tourism and Antiquities
MoM2010: Saudi Commission for Tourism and AntiquitiesMoM2010: Saudi Commission for Tourism and Antiquities
MoM2010: Saudi Commission for Tourism and AntiquitiesHend Al-Khalifa
 

Mehr von Hend Al-Khalifa (20)

أساسيات النشر العلمي
أساسيات النشر العلميأساسيات النشر العلمي
أساسيات النشر العلمي
 
عشرة أسئلة تمشكل الباحثين
عشرة أسئلة تمشكل الباحثينعشرة أسئلة تمشكل الباحثين
عشرة أسئلة تمشكل الباحثين
 
A Survey of IT Jobs in the Kingdom of Saudi Arabia 2017
A Survey of IT Jobs in the Kingdom of Saudi Arabia 2017A Survey of IT Jobs in the Kingdom of Saudi Arabia 2017
A Survey of IT Jobs in the Kingdom of Saudi Arabia 2017
 
How to search isi for Quartiles
How to search isi for QuartilesHow to search isi for Quartiles
How to search isi for Quartiles
 
مقدمة في بناء الأنطولوجيا باستخدام برنامج البورتجي
مقدمة في بناء الأنطولوجيا باستخدام برنامج البورتجيمقدمة في بناء الأنطولوجيا باستخدام برنامج البورتجي
مقدمة في بناء الأنطولوجيا باستخدام برنامج البورتجي
 
صندوق أدوات البحث العلمي
صندوق أدوات البحث العلميصندوق أدوات البحث العلمي
صندوق أدوات البحث العلمي
 
Mediterranean Arabic Language and Speech Technology Resources
Mediterranean Arabic Language and Speech Technology ResourcesMediterranean Arabic Language and Speech Technology Resources
Mediterranean Arabic Language and Speech Technology Resources
 
توجهات تقنية مبتكرة في التعلم الإلكتروني: من التقليدية للإبداعية
توجهات تقنية مبتكرة في التعلم الإلكتروني: من التقليدية للإبداعيةتوجهات تقنية مبتكرة في التعلم الإلكتروني: من التقليدية للإبداعية
توجهات تقنية مبتكرة في التعلم الإلكتروني: من التقليدية للإبداعية
 
كتيب ورشة السجل البحثي
كتيب ورشة السجل البحثيكتيب ورشة السجل البحثي
كتيب ورشة السجل البحثي
 
CIS_CfP
CIS_CfPCIS_CfP
CIS_CfP
 
Nstc
NstcNstc
Nstc
 
Dr.Nawal E-Profile
Dr.Nawal E-ProfileDr.Nawal E-Profile
Dr.Nawal E-Profile
 
It999 seminar 2012
It999 seminar 2012It999 seminar 2012
It999 seminar 2012
 
CS4HS Booklet- In Arabic
CS4HS Booklet- In ArabicCS4HS Booklet- In Arabic
CS4HS Booklet- In Arabic
 
Summer internship
Summer internshipSummer internship
Summer internship
 
Website Development Process
Website Development ProcessWebsite Development Process
Website Development Process
 
MoM2010: Data mining as an Saudi IT nation demand
MoM2010: Data mining as an Saudi IT nation demandMoM2010: Data mining as an Saudi IT nation demand
MoM2010: Data mining as an Saudi IT nation demand
 
MoM2010: E-Hospitals
MoM2010: E-HospitalsMoM2010: E-Hospitals
MoM2010: E-Hospitals
 
MoM2010: Bioinformatics
MoM2010: BioinformaticsMoM2010: Bioinformatics
MoM2010: Bioinformatics
 
MoM2010: Saudi Commission for Tourism and Antiquities
MoM2010: Saudi Commission for Tourism and AntiquitiesMoM2010: Saudi Commission for Tourism and Antiquities
MoM2010: Saudi Commission for Tourism and Antiquities
 

Kürzlich hochgeladen

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
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
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 

Kürzlich hochgeladen (20)

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
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
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
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🔝
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 

Introduction to XHTML - Key Concepts in 40 Characters

  • 2. Learning Outcomes  In this chapter, you will learn about: ◦ XHTML syntax, tags, and document type definitions ◦ The anatomy of a web page ◦ Formatting the body of a web page ◦ Formatting the text on a web page ◦ Special Characters ◦ Connecting Web pages using hyperlinks
  • 3. What is HTML?  HTML: The set of markup symbols or codes placed in a file intended for display on a Web browser page.  The World Wide Web Consortium (http://w3c.org) sets the standards for HTML and its related languages.
  • 4. What is XHTML?  The newest version of HTML  eXtensible HyperText Markup Language.  XHTML uses: ◦ the elements and attributes of HTML ◦ the syntax of XML (eXtensible Markup Language).
  • 5. XML Syntax  An XML document must be well-formed. ◦ Use lowercase ◦ Use opening and closing tags <body> </body> ◦ Close stand-alone tag with special syntax <hr />
  • 7. Document Type Definition (DTD)  W3C Recommendation: Use a Document Type Definition to identify the type of markup language used in a web page. XHTML 1.0 Transitional This is the least strict specification for XHTML 1.0. It allows the use of both Cascading Style Sheets and traditional formatting instructions such as fonts. XHTML 1.0 Strict Requires exclusive use of Cascading Style Sheets. XHTML 1.0 Frameset Required for pages using XHTML frames. We will use not use this.
  • 8. Head & Body Sections  Head Section Contains information that describes the Web page document <head> …head section info goes here </head>  Body Section Contains text and elements that display in the Web page document <body> …body section info goes here </body>
  • 9. Anatomy of an XHTML Element Opening tag <h1>content</h1> Closing Tag The closing tag always needs a slash before the tag name.
  • 10. XHTML Attributes  Attributes always go inside the opening tag. <h1 id=“blah” class=“big”> content</h1> Tags can have multiple attributes, each separated by a space.
  • 11. XHTML Elements  Top-level elements: html, head, and body  Head elements: title, meta and script  Body elements: ◦ Block-Level elements ◦ Inline elements
  • 12. XHTML <title> and <meta /> tags <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>My First Web Page</title> <meta name="description" content="Latest sports news and live scores from Yahoo! Eurosport UK. Complete sport coverage with Football results, Cricket scores, F1, Golf, Rugby, Tennis and more."> <meta name="keywords" content="eurosport,sports, sport,sports news,live scores,football,cricket,f1, golf,rugby,tennis,uk,yahoo"> </head> <body> .... Body info goes here </body> </html>
  • 13. The Heading Element <h1>Heading Level 1</h1> <h2>Heading Level 2</h2> <h3>Heading Level 3</h3> <h4>Heading Level 4</h4> <h5>Heading Level 5</h5> <h6>Heading Level 6</h6>
  • 14. XHTML <p> tag Paragraph element <p> …paragraph goes here… </p> ◦ Groups sentences and sections of text together. ◦ Configures a blank line above and below the paragraph
  • 15. XHTML <br /> tag  Line Break element ◦ Stand-alone tag …text goes here <br /> This starts on a new line…. ◦ Causes the next element or text to display on a new line
  • 16. XHTML Special Characters  Display special characters such as quotes, copyright symbol, etc. Character Code © &copy; < &lt; > &gt; & &amp; &nbsp;
  • 17. XHTML List Basics  Definition List  Ordered List  Unordered List
  • 18. XHTML Definition List  Useful to display a list of terms and definitions or a list of FAQ and answers ◦ <dl> tag Contains the definition list ◦ <dt> tag Contains a defined term Configures a line break above and below the text ◦ <dd> tag Contains a data definition or description Indents the text
  • 19. XHTML Ordered List  Conveys information in an ordered fashion  <ol> Contains the ordered list ◦ type attribute determines numbering scheme of list, default is numerals  <li> Contains an item in the list
  • 20. XHTML Ordered List Example <ol> <li>Apply to school</li> <li>Register for course</li> <li>Pay tuition</li> <li>Attend course</li> </ol>
  • 21. XHTML Unordered List Example <ul> <li>TCP</li> <li>IP</li> <li>HTTP</li> <li>FTP</li> </ul>
  • 22. Checkpoint  Describe the features of a heading tag and how it configures the text.
  • 23. XHTML <a> tag  The anchor element ◦ Specifies a hyperlink reference (href) to a file ◦ Text between the <a> and </a> is displayed on the web page. <a href="contact.html">Contact Us</a> ◦ href Attribute  Indicates the file name or URL Web page document, photo, pdf, etc. 23
  • 24. XHTML <a> tag  Absolute link ◦ Link to other Web sites <a href="http://yahoo.com">Yahoo</a>  Relative link ◦ Link to pages on your own site <a href="index.htm">Home</a> 24
  • 25. More on Relative Linking Relative links from the home page: index.html  <a href="contact.html">Contact</a>  <a href="products/collars.html">Collars</a>  <a href="../index.html">Home</a>  <a href="../services/bathing.html">Dog Bathing</a> 25
  • 26. Opening a Link in a New Browser Window  The target attribute on the anchor element opens a link in a new browser window or new browser tab. <a href="http://yahoo.com" target="_blank">Yahoo!</a> 26
  • 27. XHTML Linking to Fragment Identifiers  A link to a part of a Web page  Also called named fragments, fragment ids  Two components: 1. The element that identifies the named fragment of a Web page. This requires the id attribute. <div id=“top”> ….. </div> 2. The anchor tag that links to the named fragment of a Web page. This uses the href attribute. <a href=“#top”>Back to Top</a> Note the use of the # in the anchor tag! 27
  • 28. Checkpoint  Describe when to use an absolute link. Is the http protocol used in the href value?  Describe when to use a relative link. Is the http protocol used in the href value? 28
  • 29. Writing Valid XHTML  Check your code for syntax errors ◦ Benefit:  Valid code  more consistent browser display  W3C XHTML Validation Tool ◦ http://validator.w3.org
  • 30. Summary  This chapter provided an introduction to XHTML.  It began with an introduction to the HTML, discussed the transition to XHTML, continued with the anatomy of a web page, introduced inline and block-level formatting, and demonstrated the XHTML techniques used to create hyperlinks.  You will use these skills over and over again as you create Web pages.