Web Programming I - Week 3: Mikheil Rukhaia
Web Programming I - Week 3: Mikheil Rukhaia
Web Programming I - Week 3: Mikheil Rukhaia
Mikheil Rukhaia
Outline
2 Inline Frames
3 Laboratory Work
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 2 / 32
Images and Objects Inline Frames Laboratory Work
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 3 / 32
Images and Objects Inline Frames Laboratory Work
Images
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 4 / 32
Images and Objects Inline Frames Laboratory Work
Image formats
I Vector graphics break the image into lines and shapes, store the
lines as coordinates, and fill the spaces between the lines with
color (Flash, Silverlight, and SVG).
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 5 / 32
Images and Objects Inline Frames Laboratory Work
Bitmap images
I Images used in print are usually higher resolution, 300 dots per
inch.
I You can save an image that is 300 dots per inch at 72 pixels per
inch for the Web, but not vice versa.
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 6 / 32
Images and Objects Inline Frames Laboratory Work
GIF images
I GIFs are best suited for images with large flat areas of color.
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 7 / 32
Images and Objects Inline Frames Laboratory Work
I If there are less than 16 colors, use 4-bit GIF (half the size of an
8-bit GIF).
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 8 / 32
Images and Objects Inline Frames Laboratory Work
Animated GIFs
I GIFs can store more than one frame, rotate between them and
create animation.
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 9 / 32
Images and Objects Inline Frames Laboratory Work
JPEG images
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 10 / 32
Images and Objects Inline Frames Laboratory Work
PNG images
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 11 / 32
Images and Objects Inline Frames Laboratory Work
I Use GIFs for images with flat color, and hard edges, such as
diagrams, text, or logos.
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 12 / 32
Images and Objects Inline Frames Laboratory Work
Vector images
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 13 / 32
Images and Objects Inline Frames Laboratory Work
I Never link to images on other sites, images for your site should
always reside on your server.
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 14 / 32
Images and Objects Inline Frames Laboratory Work
Attributes of <img>
I align used to align the image within the page or the element.
I height and width specify the height and width of the image
(pixel or percentage).
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 16 / 32
Images and Objects Inline Frames Laboratory Work
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 17 / 32
Images and Objects Inline Frames Laboratory Work
Media battle
I Audio and video elements are not well supported even in modern
browsers.
I Solution was to use flash, but apple refused to add its suppot on
iOS.
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 18 / 32
Images and Objects Inline Frames Laboratory Work
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 19 / 32
Images and Objects Inline Frames Laboratory Work
Attributes of <object>
I data and type specify the URL and MIME type for a file to
process or play.
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 20 / 32
Images and Objects Inline Frames Laboratory Work
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 21 / 32
Images and Objects Inline Frames Laboratory Work
Attributes of <param>
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 22 / 32
Images and Objects Inline Frames Laboratory Work
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 23 / 32
Images and Objects Inline Frames Laboratory Work
Inline Frames
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 24 / 32
Images and Objects Inline Frames Laboratory Work
Inline frames
I Like an image, the inline frame can have text flowing around it
and it is possible to set borders and margins around the frame.
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 25 / 32
Images and Objects Inline Frames Laboratory Work
I Example:
<body>
<h1>Inline frame</h1>
<p>This is an inline frame
<iframe src="iframe.html">
Error! please upgrade your browser.
</iframe>
and text continues as it would do in
case of images.
</p>
</body>
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 26 / 32
Images and Objects Inline Frames Laboratory Work
Attributes of <iframe>
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 27 / 32
Images and Objects Inline Frames Laboratory Work
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 28 / 32
Images and Objects Inline Frames Laboratory Work
Value Purpose
_self Loads the page into the current frame.
_blank Loads a page into a new window (same if using
a non existing target).
_parent Loads the page into the parent iframe.
_top Loads the page into the browser window.
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 29 / 32
Images and Objects Inline Frames Laboratory Work
Laboratory Work
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 30 / 32
Images and Objects Inline Frames Laboratory Work
Exercises
I Add some images to your CV web page from the first lab work.
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 31 / 32
Images and Objects Inline Frames Laboratory Work
Discussion?!
Web Programming I — Week 3 M. Rukhaia International Black Sea University September 10, 2018 32 / 32