HTML
Attributes
- An attribute adds information to a tag
- An attribute takes on a value
- For example, <p style="color: #0000ff">
- For example, <h2 style="background-color: rgb(255, 255, 0)">
- For example, <h2 title="Section Name">
Links
- Tag: a - anchor
- Attribute: href - hypertext reference
- Possible value: http://www.cs.montana.edu
- Possible value: page.html
- Possible value: subfolder/page.html
- Possible value: ../page.html
- Possible value: #name (in conjunction with the id attribute)
- Possible value: mailto:somebody@gmail.com
Images
Common formats are gif (Graphical Interchange Format),
jpg or jpeg (Joint Photographic Experts Group), and
png (Portable Network Graphics).
- Tag: img - image
- Attribute: src - source
- Attribute: alt - alternate description
- Attribute: width, e.g. 100px or 30%
- Attribute: height
- Attribute: title
Note: An image can also be a link.
Tables
- Tag: table
- Attribute: border
- Attribute: width
- Attribute: align, Values: left, center, right
- Attribute: valign, Values: top, middle, bottom
- Tag: tr - table row
- Tag: td - table data
- Attribute: colspan
- Attribute: rowspan
- Tag: th - table header
- Attribute: rowspan
Note: Tables were formerly used as a layout tool in the old days of
the Internet. Now CSS (cascading style sheets) is preferred.