Understanding html

28
The Structure of HTML by Ray Villalobos

description

The Fundamentla

Transcript of Understanding html

Page 1: Understanding html

The Structure of HTMLby Ray Villalobos

Page 2: Understanding html

What is HTML?

• A Markup Language

• Hypertext

Page 3: Understanding html

Different Versions

• HTML 4

• XHTML

• HTML5

• Transitional vs Strict

Page 4: Understanding html

HTML5

Page 5: Understanding html

Typical HTML5 Page

• <!DOCTYPE html><html lang="en">

<head><meta charset="utf-8" /><title></title>

</head><body></body>

</html>

Page 6: Understanding html

Old Style HTML Page

<?xml version="1.0" encoding="utf-8"?><!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> <meta http-equiv="content-type" content="text/html; charset=utf-8" /><title>Untitled</title></head><body></body></html>

Page 7: Understanding html

What is HTML5?

• A new version of the language

• A Spec, not yet finished

• Common sense

• New Descriptive tags

• Built for WebApps

Page 8: Understanding html

Simpler

• Simpler Coding

• New Parsing rules (more flexible)

• Common Sense Tags

• More descriptive

Page 9: Understanding html

New Tags

• article, aside, datalist, details, embed, figure, footer, header, hgroup, nav, output, progress, section, source, summary, time.

• Easier audio & video

• Canvas for graphics

Page 10: Understanding html

New APIs for WebApps

• Offline Storage

• Document Editing

• Drag & Drop

• Geolocation

• Databases

Page 11: Understanding html

HTML5

Page 12: Understanding html

Typical HTML5 Page

• <!DOCTYPE html><html lang="en">

<head><meta charset="utf-8" /><title></title>

</head><body></body>

</html>

Page 13: Understanding html

<HEAD></HEAD>

• Content mostly invisible to browser

• Process mostly before page loads

• <TITLE>Document's Name</TITLE>

• <META> Data about data

Page 14: Understanding html

<HTML></HTML>

• The tag to rule all tags

Page 15: Understanding html

<BODY></BODY>

• Where most visible content goes

Page 16: Understanding html

The Markup Tags

• <ELEMENT [ATTRIBUTE[="VALUE"]]...>CONTENT[</ELEMENT>]

• My name is <em>Ray Villalobos</em>

• My name is Ray Villalobos

Page 17: Understanding html

Types of Tags

• Beginning & End tags (<em></em>)

• Standalone tags (<br />)

• Tags with Attributes (<a href="#">)

• Invisible (head section, comments)

Page 18: Understanding html

Other Important Tags

• The Headline Tags: h1,h2,h3,h4,h5,h6

• Paragraph tags <p></p>

• Image Tags <img src=”” alt=””>

• Emphasis, Strong

• http://www.w3schools.com/tags

Page 19: Understanding html

Unders

• <p> Denotes paragraphs.

Page 20: Understanding html

Classification of Tags

• Block Level (<p>This is a paragraph</p>)

• Inline (To <strong>emphasize</strong> something)

• Invisible Tags (<style type=”text/css”>p { color:#FCC; }</style>)

Page 21: Understanding html

SPECIAL Tags

• <div id="genericblock"></div>

• <span class="genericstyle"></span>

Page 22: Understanding html

ADDING MEANING

• To improve SEO

• Usability

Page 23: Understanding html

Validating

• Validator http://validator.w3.org

• Helps catch errors

• Checks for correct usage of tags

Page 24: Understanding html

Creating Links

• Three Types of Links

• Absolute (http://)

• Relative (../)

• Root Relative (/)

Page 25: Understanding html

Working with Text Editors

• Mac: TextWrangler, BBEdit, Aptana, Coda

• PC: Notepad++, Aptana Studio

Page 26: Understanding html

FTP App lications

• Cyberduck (Mac or PC)

• Transmit (Mac)

• FileZilla (PC)

Page 27: Understanding html

Setting up a WorkFlow

• Work, then upload

• Edit Directly from Server

Page 28: Understanding html

The End