15
XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

Embed Size (px)

Citation preview

Page 1: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

XHTML and CSSSession 1

Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process,

basic XHTML elements

Page 2: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

What is required?

• Plaint text editor, like Notepad• Web browser, like FF or IE• Commitment to learn something new• Problem-solving skills (which you’ll learn and

develop along the way)

Page 3: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

What to expect?

• XHTML and CSS are strictly for presentational purposes only – no programming

• A lot of exercises and do-it-yourself required• The beginning, not the end

Page 4: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

Web Development ProcessClient specify needs and

requirements

Design process

Code design into working website using XHTML/CSS

Programming

Testing

Debugging

Publish

Page 5: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

What is (X)HTML?

• (eXtensible) HyperText Markup Language• Code used to ‘write’ webpages• XML + HTML = XHTML• A stricter, cleaner version of HTML

Page 6: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements
Page 7: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

What is CSS?

• Cascading Style Sheet• Specify how a webpage should look like• HTML = content || CSS = style/looks

Page 8: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements
Page 9: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

What is W3C?

• World Wide Web Consortium• Sets and develop standards for the World

Wide Web

Page 10: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

What are internet browsers?

• Software that reads HTML document and convert the arcane codes into nice-looking webpages

• Firefox, Internet Explorer, Safari, Netscape, etc.

• W3C Standard compliance• Cross-browser compatibility

Page 11: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

What is a webpage?

• A plain text document, consisting of codes with .html file extension

• Complexity varies – several HTML lines to complex with multiple languages

Page 12: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

XHTML Document Structure<html>

<head><title>My first webpage</title>

</head>

<body><p class=“foo”>Hello, world!</p>

</body>

</html>

Page 13: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

XHTML tags, elements, attributes<p class=“foo”>Hello, world!</p>

Start tag

attributeEnd tagElement content

Element

Page 14: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

Element syntax• Starts with a start tag, ends with end tag, with element content in

between.– <p>This is a paragraph</p>

• Some HTML elements have empty content• Empty elements are closed in the start tag

– <img src=“foo.jpg” alt=“Picture of foo”></img>– becomes– <img src=“foo.jpg” alt=“Picture of foo” />

• Most HTML elements can have attributes– <img src=“foo.jpg” alt=“Picture of foo” />

Page 15: XHTML and CSS Session 1 Intro, (X)HTML, CSS, W3C, browsers, webpage, structure, tags, attributes, elements, web development process, basic XHTML elements

Attributes

• Attributes provide additional information about the element

• Attributes are always specified in the start tag• Attributes come in name/value pairs like:

name="value"