26
SOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review SOEN 287 Web Programming Stuart Thiel Concordia University Department of Engineering Computer Science Winter, 2014

SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

ReviewSOEN 287 Web Programming

Stuart Thiel

Concordia UniversityDepartment of Engineering Computer Science

Winter, 2014

Page 2: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Outline

Tags with Style

Page 3: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Tags with Style

I Last section, looked at semantic tags

I Some tags have visual expectation

Page 4: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Tables

I Present tabular data

I . . . layout?

I The most complex structure

Page 5: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Tables Components

I Headers

I FootersI Rows

I Height

I CellsI Columns?

I WidthI Can specify by index

Page 6: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Table Cells

I AlignmentI text-alignI vertical-align

I borders

I padding

I margin

Page 7: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Complex Table Cells

I rowspan

I colspan

I http://www.w3schools.com/tags/tryit.asp?

filename=tryhtml_th_rowspan_0

Page 8: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Lists

I Unordered

I Ordered

I Definition

Page 9: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Sublists and Styling

I New lists inside

I Differentiate sub-lists

I disc, square, circle

I number, alpha, roman (upper/lower)

I Can get fancy with counters (CSS) and sublists

Page 10: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Tags with Expected Style

I You can change this

I Arguably, shouldn’t “expect” this

I em, strong, code, sub, sup, br, hr

Page 11: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Pre–formatted Text

I pre

I Doesn’t compress whitespace

I *usually* fixed-width

Page 12: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Figures

I All non-text media

I figcaption treated as expected

Page 13: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Outline I

Tags with StyleFonts, Color, Image Types, etc.SupplementalReview

Page 14: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Fuscia?

I Red, Green and BlueI Hue, Saturation, Lightness and Alpha

I alpha is coolI there term “opacity” has always bothered me

I What’s this hex stuff?I #CCCCCCI #555555I rgb(0,204,108)

I Hash or not?

Page 15: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Fuscia?

I Red, Green and BlueI Hue, Saturation, Lightness and Alpha

I alpha is coolI there term “opacity” has always bothered me

I What’s this hex stuff?I #CCCCCCI #555555I rgb(0,204,108)

I Hash or not?

Page 16: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Fuscia?

I Red, Green and BlueI Hue, Saturation, Lightness and Alpha

I alpha is coolI there term “opacity” has always bothered me

I What’s this hex stuff?I #CCCCCCI #555555I rgb(0,204,108)

I Hash or not?

Page 17: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Fuscia?

I Red, Green and BlueI Hue, Saturation, Lightness and Alpha

I alpha is coolI there term “opacity” has always bothered me

I What’s this hex stuff?I #CCCCCCI #555555I rgb(0,204,108)

I Hash or not?

Page 18: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Image types

I gif

I jpeg

I bmp

I png

Page 19: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Fonts

I Now done in CSS

I font tag may still exist. . . avoid

I fixed-width or variable width

I People make fun of Comic Sans

Page 20: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Units

I Mostly relevant in css

I must be specified, cm/em/px

I px vs cm?

I % is special

Page 21: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Outline I

Tags with StyleFonts, Color, Image Types, etc.SupplementalReview

Page 22: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Making Sure We Got Tables

I theadI moves itself to the topI tr

I thI maybe td

I you can have multiple thead, they stack. . . don’t

I tbodyI tr

I tdI maybe th

Page 23: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Tables and Feet

I tfootI moves itself to the bottomI tr

I thI maybe td

I you can have multiple tfoot, they stack. . . don’t

Page 24: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Outline I

Tags with StyleFonts, Color, Image Types, etc.SupplementalReview

Page 25: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Expected Structure

I A bunch of tags are assumed to have a structure

I It’s not official

I . . . but it really is

Page 26: SOEN 287 Web Programming - Encssthiel/soen287/2014_4/TagsWithStyle.pdfSOEN 287 Web Programming Stuart Thiel Tags with Style Fonts, Color, Image Types, etc. Supplemental Review Tags

SOEN 287 WebProgramming

Stuart Thiel

Tags with Style

Fonts, Color, ImageTypes, etc.

Supplemental

Review

Expected Structure

I A bunch of tags are assumed to have a structure

I It’s not official

I . . . but it really is