Thursday, January 29
Links and In-line Style
- Chapter 6: Links
- Creating a Link to Another Web Page:
<a href="URL"> CLICKABLE </a> - Creating Anchors:
<a name="ANCHOR NAME"> ANYTHING </a>
andidattribute can also be used on other tags. - Linking to a Specific Anchor:
<a href="http://www.site.com/path/page.html#anchorname"> CLICKABLE </a> - Targeting Links to Specific Windows:
_blank or window.name - Setting the Default Target: (in the head)
<base target="name" />[deprecated] - Using Images to Label Links
- Linking Thumbnails to Images
- Creating a Client-Side Image Map:
- Use both attributes
name and idlabel the map because XHTML strict requiresid -
<area alt="info" shape="rect" coords="x1,y1,x2,y2" upper-left,lower-right shape="circle" coords="x,y,r" center,radius shape="poly" coords="x1,y1,x2,y2,...,xn,yn" each point on the polygon > -
- Use both attributes
- Creating a Link to Another Web Page:
- Relative vs Full-path Hyper-References
href or src = "../../imgages/page.html"href or src = "http://brandeis.edu/imgages/page.html"- Protocol is important! What's wrong with this?
href = "www.brandeis.edu/imgages/page.html"
- In-line Style
- The XHTML attribute is
styleand the form at is
<element style="property1: value1; property: value2">
CONTENT
</element> - Some basic properties
backgroundimage or a color [also takes hex color#FFFFFF, rgb(), url()],
colorof text [also takes hex color#000000, rgb(), url()],
fontcan specify weight, style, family, size - Extra elements:
div, span, and pre
- The XHTML attribute is