Notes for Codefellows Code 401 301 201 and 102
img.large {
width: 500px;
height: 500px;
}
img.medium{
width: 250px;
height: 250px;
}
img.small{
width: 100px;
height: 100px;
}
img.align-left{
float: left;
margin-right: 10px;
}
img.align-right{
float: right;
margin-left: 10px;
}
img.align-center{
display: block;
margin: 0px auto;
}
body {
background-image: url('images/image.gif')
}
body{
background-image: url('images/image.gif')
background-repeat: repeat-x;
}
The background-attachment property specifies whether a background image should stay in one position or move as the user scrolls up and down. Values:
body{
background-image: url('images/image.gif')
background-repeat: no-repeat;
background-attachment: fixed;
}
body{
background-image: url('images/image.gif')
background-repeat: no-repeat;
background-position: center top;
}
body {
background-image: linear-gradient (#336666, #66cccc)
}
In every page of website there are seven key places where keywords can appear in order to improve its findability.
<title> </title>
element.<hn>
element then a search engine will know that this page is all about that subject and give it greater weight than other text.<head>
element and is specified using a <meta>
tag. It should be a sentence that describes the content of the page.pages 487-490
Javascript Libraries published in 2005 (jQuerry,..) made it easier for people to create animations in JS. iphone 2007 and ipad 2010 decided not to support flas. Flas content does not always support accessibility. 2008 HTML5 support of <video> <audio>
tags
Video and Audio:
The <video>
and <audio>
elements allow us to embed video and audio into web pages.
<video controls>
<source src="rabbit320.mp4" type="video/mp4" />
<source src="rabbit320.webm" type="video/webm" />
<p>
Your browser doesn't support HTML5 video. Here is a
<a href="rabbit320.mp4">link to the video</a> instead.
</p>
</video>
The <source>
element allows us to present a video in different formats.
Part of the HTML5 spec, the HTMLMediaElement API provides features to allow you to control video and audio players programmatically — for example HTMLMediaElement.play()
, HTMLMediaElement.pause()
, etc. This interface is available to both <audio>
and <video>
elements, as the features you’ll want to implement are nearly identical. Let’s go through an example, adding features as we go.
Event handler functions associated with video/audio
playPauseMedia()
stopMedia()
mediaBackward()
mediaForward()