© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Slides:



Advertisements
Similar presentations
Pengantar Teknologi Mobile 13 Antonius Rachmat C, S.Kom, M.Cs XHTML.
Advertisements

F DIGITAL MEDIA: COMMUNICATION AND DESIGN INTRODUCTION TO XML AND XHTML.
Chapter 14 Introduction to HTML
HTML BASICS Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
 XHTML is aimed to replace HTML  XHTML is almost identical to HTML 4.01  XHTML is a stricter and cleaner version of HTML  XHTML is HTML defined as.
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
Introduction. Document Structure Overview  XML declaration (prolog)  Document type declaration  Root element (namespace)  Document header  Document.
1 XHTML محمد احمدی نیا 2 Of 19 HTML vs XHTML  XHTML is a stricter and cleaner version of HTML.  by combining the strengths of HTML.
>> Introduction to HTML: Tags. Hyper - is the opposite of linear Text – words / sentences / paragraphs Mark-up – Marking the text Language – It is a language.
XHTML. Introduction to XHTML What Is XHTML? – XHTML stands for EXtensible HyperText Markup Language – XHTML is almost identical to HTML 4.01 – XHTML is.
Lesson 4.
Lecture: Web Design Assis. Prof. Freshta Hanif Ehsan Faculty of Computer Science Kabul Polytechnic University Spring Semester
Introduction to HTML Year 8. What is HTML O Hyper Text Mark-up Language O The language that all the elements of a web page are written in. O It describes.
HTML Structure & syntax
Basic HTML Introduction to HTML.
Pertemuan 1 Desain web Pertemuan 1
What is XHTML? XHTML stands for Extensible Hypertext Markup Language
Fall 2016 CSULA Saloni Chacha
INTRO TO WEB DEVELOPMENT html
Web Basics: HTML/CSS/JavaScript What are they?
HTML basics
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Introduction to basic HTML
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Essential Tags Web Design – Sec 3-3
Web Design and Development
Building Blocks of a Web Page HTML, HTML 5, CSS & XHTML
Elements of HTML Web Design – Sec 3-2
Mansoor Ahmed Bughio.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
HTML.
W3C Web standards and Recommendations
XHTML Basics.
3.00cs HTML Overview 3.00cs Develop webpages.
What is XHTML?.
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Essential Tags Web Design – Sec 3-3
Chapter 4 Introduction to XHTML: Part 1
Chapter 1: Introduction to XHTML (part 1)
Introduction to XHTML.
Elements of HTML Web Design – Sec 3-2
XHTML Basics.
XHTML
XHTML Basics.
HTML A brief introduction HTML.
XHTML Review Anita Philipp Updated Spring 2016.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Marking Up with XHTML Tags describe how a web page should look
HTML 12/27/2018.
Introduction to HTML5.
HTML Basic Structure.
XHTML Basics.
Web Application Development
Basic HTML Workshop.
Marking Up with XHTML Tags describe how a web page should look
Pertemuan 1 Desain web Pertemuan 1
HyperText Markup Language
The Most Basic HTML Page
Marking Up with XHTML Tags describe how a web page should look
Creating a Basic Web Page
XHTML Basics.
XHTML 7-May-19.
Lesson 2: HTML5 Coding.
XHTML 29-May-19.
محمد احمدی نیا XHTML محمد احمدی نیا
Web Design & Development
Marking Up with XHTML Tags describe how a web page should look
INTRODUCTION TO WEB DEVELOPMENT
Creating Web Documents
Presentation transcript:

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. "Digital Media Primer" Yue-Ling Wong, Copyright (c)2016 by Pearson Education, Inc. All rights reserved. © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Chapter 8 Introduction to HTML Part 2 Basic Structure of an HTML Document © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

In this lecture, you will learn: Basic structure of an HTML document What tags and attributes are XHTML vs. HTML © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Markup Tag Tells the Web browser the format of the text Surrounded by < and > Examples: paragraph tag: <p> © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Markup Tag In pairs: start tag and end tag (closing tag) Example: start tag: <p> end tag: </p> Placement of start and end tags Example: <p>This is a paragraph.</p> element content © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Tags That Do Not Have Element Content Examples: line break: <br></br> can be written as: <br /> image tag: <img></img> can be written as: <img /> © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Attributes of a Tag To specify properties of the element that is marked up the tag Example: id attribute: <p id="introduction">This is a paragraph.</p> Placed inside the start tag In name-value pairs like this: name = "value" © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Basic Structure of an HTML Document <html> <head> <title>This is a title.</title> </head> <body> This is the content of the Web page. </body> </html> © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. <html> tag First tag in an HTML document Tells the browser that this is the start of an HTML document End tag </html> is placed at the end of the HTML document © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. <head> tag Its element content is the header information <title> function definitions of JavaScript links to external JavaScript and style sheets Header information is not displayed in the body of the browser window © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. <title> Tag Its element content is the title of the document The title is displayed on the Window bar of the browser window The title is used as the bookmark for the page © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. <body> Tag Its element content is what will be displayed in the browser window © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Nested Tags Markup elements can be nested in another element (i.e., placed within another element’s content.) Example: header and body elements are nested inside <html> title element is nested inside <head> © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

End Tag Placement in Nested Tags Similar to how parentheses are paired in a mathematical equation © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Basic Structure of an XHTML Document Same basic structure as an HTML document Plus a DOCTYPE declaration before <html> tag © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Basic Structure of an XHTML Document Example: <!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"> <head> <title>This is a title.</title> </head> <body> This is the content of the Web page. </body> </html> © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. DOCTYPE Declaration DOCTYPE stands for document type Uses the <!DOCTYPE> tag Placed in the very first line in the document Tells the browser which HTML or XHTML specification the document uses If the code used in the document does not match the DOCTYPE declared, then some of the elements may not be displayed as expected A Web page editor, such as Adobe Dreamweaver, usually inserts it for you © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. 3 Document Types The XHTML 1.0 specifies three document types: Strict <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Transitional <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Frameset <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. XHTML vs. HTML XHTML elements must always be closed or paired Any start tag must be paired with an end tag XHTML tags and attributes must be in lowercase XHTML elements mus be properly nested within each other © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. XHTML vs. HTML An XHTML document must have one root element (i.e., the topmost element) <html> is the root element of an XHTML document The HTML element must designate the XHTML namespace, like this: <html xmlns=" http://www.w3.org/1999/xhtml "> xmlns is the namespace attribute There must be a DOCTYPE declaration in the document prior to the root element (i.e., <html>) © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Questions Note to instructor: Depending on your preference, you may want to go over the review questions at the end of this lecture as an instant review or at the beginning of next lecture to refresh students' memory of this lecture. © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Question ___ are markup codes in an HTML document that tell the Web browser how to format the text when displaying it. Tags Attributes A © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Question ___ specify properties of the element that is marked up by the ___. Tags; attribute Attributes; tag B © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Question <p id="introduction">This is a paragraph.</p> In the example above, ___ is a tag and ___ is its attribute. <p>; id id; <p> A © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Question In the HTML code: <p>This is a paragraph.</p> <p> is the __, and </p> is the ___. The text "This is a paragraph." is the ___. element content; start tag; end tag element content; end tag; start tag start tag; end tag; element content start tag; element content; end tag end tag; start tag; element content end tag; element content; start tag C © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Question Fill in the correct start tags and end tags to create a basic HTML document. <___> <___>This is a title.<___> This is the content of the Web page. <html> <head> <title>This is a title.</title> </head> <body> This is the content of the Web page. </body> </html> © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.

© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved. Review Question Describe briefly how XHTML is different from HTML in terms of each of the following: Tag pairing Cases of tags Tag nesting Root element of a page DOCTYPE declaration i. Any start tag must be paired with an end tag ii. Lowercase iii. Nested tags be properly closed (similar to how parentheses are paired in a math equation) iv. Must have one root, <html> v. Must have a DOCTYPE declaration in before the root element, i.e. in the first line before <html> tag © 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.