50 Questions
What type of graphic is best suited for line art and logos?
GIF
What is the purpose of the figcaption
element in HTML?
To provide a caption for a figure or image
What is the advantage of using a PNG image over a GIF?
PNG has a larger color palette
How can an image be configured as a hyperlink in HTML?
By wrapping the image in an a
element
What is the purpose of the background
property in CSS?
To configure an image as the background of an element
What is the purpose of the text-indent
property in CSS?
To indent the first line of text in an element
How can text alignment be configured in CSS?
Using the text-align
property with values such as left
, right
, or center
What is the purpose of the list-style
property in CSS?
To configure the marker or bullet style of a list
How can font style be configured in CSS?
Using the font
property with values such as italic
or bold
It is recommended to use uppercase letters when naming image files.
False
What is an advantage of using CSS3 for multiple background images?
CSS3 allows for multiple background images with different properties
Punctuation symbols are allowed in image file names.
False
The src attribute of the image element specifies the alternate text content.
False
Image links can be created using the img element only.
False
The alt attribute is only required for decorative images.
False
Browsers do not add a border to image links by default.
False
Thumbnails are configured to link to smaller versions of the image.
False
File extensions for image files should be changed to reduce file size.
False
The height attribute of the image element specifies the width of the graphic in pixels.
False
Accessibility guidelines recommend using empty alt attributes for decorative images.
True
What are the four common types of graphics used on the web?
GIF, JPG, PNG, WebP
What is the advantage of using a GIF graphic?
Can be animated and uses lossless compression
How can an image be configured as a background on a web page?
Using the background property in CSS
What is the purpose of a thumbnail image?
To link to a larger version of the image
What attribute of the image element specifies the alternate text content?
The alt attribute
How can an image link be created in HTML?
By surrounding the img element with an anchor element
Why is it important to configure images with accessibility in mind?
To ensure that all users, including those with disabilities, can access the content
Can an image be configured to have a transparent background?
Yes, using the GIF or PNG format
What is the benefit of using CSS3 for multiple background images?
Allows for multiple background images to be configured
Why is it important to consider file size when working with images?
To ensure fast page loading and improve user experience
The most basic method to provide audio or video files is through a ______.
hyperlink
A ______ is designated by the file extension and contains the media and metadata.
container
The ______ is the algorithm used to compress and decompress the media.
codec
HTML5 audio and video are ______ to the browser, but browsers do not all support the same codecs.
native
Only publish web pages, images, and other media that you have personally created or have obtained the ______ or license to use.
rights
All work (including web pages) are automatically ______ even if there is not copyright mark or date.
copyrighted
To provide accessible multimedia content, we should provide ______ for audio.
transcript
When using multimedia, be careful to minimize the issue of too long of a ______ time.
download
The ______ Use Clause of the Copyright Act allows for limited use of copyrighted material.
Fair
To embed a video, we can use the ______ element.
iframe
What is automatically protected by copyright even if there is no copyright mark or date?
All work, including web pages
Why is it important to be careful when using multimedia on web pages?
To minimize download time
What should be provided for audio content to make it accessible?
Transcript
What allows for limited use of copyrighted material?
Fair Use Clause of the Copyright Act
What element can be used to embed a video?
iframe element
What is the main difference between a container and a codec?
A container is used to store the media and metadata, while a codec is the algorithm used to compress and decompress the media.
What is the most basic method to provide audio or video files on a web page?
Linking to the file using a hyperlink.
Which of the following is an open-source audio file type?
.ogg
Why is it important to consider copyright issues when publishing web pages and media?
To ensure that the creator of the media has the necessary rights or licenses to use it.
What is a characteristic of HTML5 audio and video?
They are native to the browser, but browsers do not all support the same codecs.
Study Notes
Configuring Text Properties
- Font-weight property configures the boldness of text.
- Font-style property configures the style of the text.
- Line-height property modifies the height of a line of text.
- Text-decoration property modifies the display of text, often used to remove the default underline from hyperlinks.
- Text-transform property configures the capitalization of text.
- Letter-spacing property configures the space between text characters.
Configuring List Markers
- List-style-type property configures the type of list marker.
- List-style-image property configures the image used as a list marker.
- List-style-position property configures the position of the list marker.
Favicon
- A small icon that displays in the address bar or tab bar of some browsers.
- Also known as a favorites icon.
Image Map
- Map element defines the map.
- Area element defines a specific area on a map, which can be set to a rectangle, circle, or polygon.
- Href attribute specifies the link.
- Shape attribute specifies the shape of the area.
- Coords attribute specifies the coordinates of the area.
CSS Background Image Property
- Configures a background image.
- By default, background images tile (repeat).
CSS Background Repeat Property
- Background-repeat property configures the repeating of a background image.
- No-repeat value prevents the background image from repeating.
Multiple Background Images
- Can be configured using multiple background-image properties.
- Each background image can have different properties.
Configuring Typeface with CSS
- Font-family property configures the typeface of the text.
- Must include a generic family name.
Configuring Font Size with CSS
- Font-size property configures the size of text.
Aligning and Indenting Text with CSS
- Text-align property configures the alignment of text.
- Text-indent property configures the indentation of the first line of text in an element.
Graphics and Text Styling
- Learning outcomes include describing types of graphics used on the Web, applying img, figure, and figcaption elements, and configuring text and images with CSS.
Types of Graphics
- GIF: Graphics Interchange Format, best used for line art and logos, maximum of 256 colors, can be animated, and uses lossless compression.
- JPG: best used for photographs.
- PNG: best used for images with transparent backgrounds.
- WebP: best used for web pages, supports both lossy and lossless compression.
CSS Background Image Property
- Configures a background image
- By default, background images tile (repeat)
- Example:
body { background-image: url(background1.gif); }
CSS Background Repeat Property
- Used to control how the background image is repeated
- Example:
h2 { background-image: url(trilliumbullet.gif); background-repeat: no-repeat; }
Multiple Background Images
- Multiple background images can be configured using a comma-separated list
- Example:
body { background-image: url(coffee.gif) no-repeat left bottom, url(coffeepour.jpg) no-repeat; }
Configuring Typeface with CSS
- The
font-family
property configures the font typeface of the text - Example:
p { font-family: Verdana, Arial, sans-serif; }
- The
font-size
property configures the size of the text - Example:
p { font-size: 90%; }
Align and Indent Text with CSS
- The
text-align
property configures the alignment of text - Example:
h1 { text-align: center; }
- The
text-indent
property configures the indentation of the first line of text - Example:
p { text-indent: 5em; }
Graphics on the Web
- Common types of graphics used on web pages: GIF, JPG, PNG, WebP
- Graphics Interchange Format (GIF) is best used for line art and logos
- GIFs can be animated and use lossless compression
Choosing Names for Image Files
- Use all lowercase letters
- Do not use punctuation symbols and spaces
- Do not change the file extensions
- Keep file names short but descriptive
The Image Element
- Configures graphics on a web page
-
src
attribute specifies the file name of the graphic -
alt
attribute specifies alternate text content (description) -
height
andwidth
attributes specify the height and width of the graphic in pixels
Accessibility and Images
- Required: configure the
alt
attribute to provide alternate text content - Recommended: provide simple text links at the bottom of the page for site navigation using image links
Image Links
- To create an image link, use an anchor element to contain an image element
- Browsers automatically add a border to image links, which can be eliminated using CSS
Choosing Names for Image Files
• Use all lowercase letters when naming image files. • Avoid using punctuation symbols and spaces in image file names. • File extensions should be maintained (e.g., .gif, .jpg, .jpeg, or .png). • Keep file names short but descriptive, e.g., dog-birthday.gif.
The Image Element
• The image element configures graphics on a web page.
• The src
attribute specifies the file name of the graphic.
• The alt
attribute configures alternate text content (description).
• The height
attribute sets the height of the graphic in pixels.
• The width
attribute sets the width of the graphic in pixels.
Accessibility & Images
• The alt
attribute is required to configure alternate text content.
• Alternate text content conveys the meaning/intent of the image.
• Use alt=""
for purely decorative images.
• If site navigation uses image links, provide simple text links at the bottom of the page.
Image Links
• Create an image link by using an anchor element to contain an image element.
• Browsers automatically add a border to image links, which can be eliminated using CSS (img {border-style: none; }
).
Thumbnail Image
• A thumbnail image is a small image configured to link to a larger version of that image.
JPEG
• Joint Photographic Experts Group (JPEG) is best used for photographs. • JPEG supports up to 16.7 million colors. • JPEG uses lossy compression. • JPEG cannot be animated or made transparent. • Progressive JPEG is similar to interlaced display.
PNG
• Portable Network Graphic (PNG) supports millions of colors. • PNG supports multiple levels of transparency (but limit to one transparent color for Web display). • PNG supports interlacing. • PNG uses lossless compression. • PNG combines the best of GIF and JPEG. • Browser support for PNG is growing.
WebP
• WebP supports millions of colors. • WebP supports transparency. • WebP uses both lossy and lossless compression. • WebP is intended to provide improved compression for GIF and JPG images. • Browser support for WebP is growing.
Image Optimization
• Image optimization is the process of creating an image with the lowest file size that still renders a good quality image. • Image optimization involves balancing image quality and file size. • Use a graphics application to reduce image dimensions and file size.
Optimize An Image for the Web
• Reduce the file size of the image. • Reduce the dimensions of the image to the actual width and height of the image on the web page. • Use image editing tools like GIMP, Adobe Photoshop, or Pixlr to optimize images.
Types of Graphics
• Graphic types commonly used on web pages: GIF, JPG, PNG, and WebP.
GIF
• Graphics Interchange Format (GIF) is best used for line art and logos. • GIF has a maximum of 256 colors. • One color can be configured as transparent in GIF. • GIF can be animated and uses lossless compression. • GIF can be interlaced.
Media & Interactivity
- Types of multimedia files used on the Web include audio and video files.
- Hyperlinking is the most basic method to provide audio or video files on a web page.
Containers & Codecs
- A container is designated by the file extension and contains the media and metadata.
- A codec is the algorithm used to compress and decompress the media.
- HTML5 audio and video are native to the browser, but browsers do not all support the same codecs.
Audio File Types
- .aac, .mp4 files use MPEG 4 Audio.
- .mp3 files use MPEG-1 Audio Layer-3.
- .ogg files use Ogg Vorbis (open-source).
- .wav files use Wave File.
Video File Types
- .av1, .mp4 files use AV1 codec (open-source).
- .m4v, .mp4 files use MPEG-4, H.264 codec.
- .mov files use Quicktime MPEG-4 codec.
- .mov, .mp4, .hevc files use High-efficiency Video Coding, H.265 codec.
- .ogv, .ogg files use Ogg Theora (open-source), Theora codec.
- .webm files use VP8 & VP9 codecs (open-source).
Copyright Issues
- Only publish media that you have personally created or have obtained the rights or license to use.
- All work, including web pages, are automatically copyrighted even if there is no copyright mark or date.
- Fair Use Clause of the Copyright Act and Creative Commons provide alternative approaches to copyright.
Multimedia & Accessibility
- Provide alternate content for accessibility, such as transcripts for audio and captions for video.
HTML5 Audio & Video Elements
- Use the
and
elements to configure audio on a web page. - Use the
and
elements to configure video on a web page. - Use the `` element to embed a video.
CSS Drop Down Menu
- Configure the
nav
container withposition: relative
. - Code the submenu (
ul
element) with the parentli
element. - Configure the submenu
ul
element to initially not display. - Configure the submenu
ul
element withabsolute positioning
.
Media & Interactivity
- Multimedia files can be used on the web to enhance user experience
- There are different types of multimedia files, including audio and video files
Configuring Audio & Video
- The most basic method to provide audio or video files is through hyperlinking
- HTML5 provides native support for audio and video elements, but browsers do not all support the same codecs
Containers & Codecs
- A container is designated by the file extension and contains the media and metadata
- A codec is an algorithm used to compress and decompress the media
Common Audio File Types
- .aac, .mp4: MPEG 4 Audio
- .mp3: MPEG-1 Audio Layer-3
- .ogg: Ogg Vorbis (open-source)
- .wav: Wave File
Common Video File Types
- .av1, .mp4: Open-source, Alliance for Open Media, AV1 codec
- .m4v, .mp4: MPEG-4, H.264 codec
- .mov: Quicktime MPEG-4 codec
- .mov, .mp4, .hevc: High-efficiency Video Coding, H.265 codec
- .ogv, .ogg: Open-source, Ogg Theora (open-source), Theora codec
- .webm: Open media format, VP8 & VP9 codecs
Copyright Issues
- Only publish media that you have personally created or have obtained the rights or license to use
- Ask permission to use media created by another person
- All work (including web pages) is automatically copyrighted even if there is not a copyright mark or date
- Fair Use Clause of the Copyright Act allows for limited use of copyrighted materials
- Creative Commons provides an alternative approach to copyright
Multimedia & Accessibility
- Provide alternate content for multimedia, such as:
- Transcripts (for audio)
- Captions (for video)
- Text format
HTML5 Audio & Source Elements
- Use the `` element to configure audio on a web page
- The `` element can be used to specify multiple audio file formats
HTML5 Video & Source Elements
- Use the `` element to configure video on a web page
- The `` element can be used to specify multiple video file formats
Using the iframe Element
- The `` element can be used to embed a video from another website
CSS Drop Down Menu
- Configure a navigation container with
position: relative
- Code a submenu (drop-down menu)
ul
element with the parentli
element - Configure the submenu
ul
element to initially not display - Configure the submenu
ul
element withabsolute
positioning
Test your knowledge of CSS text properties such as font-weight, font-style, and line-height. Configure the boldness, style, and height of text with these essential properties.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free