Week 8 - Review questions
- 1.The style rule p { left-margin: 2em; } sets the left margin for the paragraph element to 2em.
- False. It should be {margin-left: 2em;}
- 2.How would I write code to set the white spaces between words to 3em? Remember that browsers have default spacing.
- {word-spacing:3em;}
- 3. Which of the following properly tiles an image across the entire background of the Web page?
- a.
- 4. Which of the following correctly sets the element's position property to absolute and offsets it from the top of the page by 140 pixels?
- d.
- 5.You have been asked to give a presentation at a conference. Your visual presentation is in the form of a website that is projected onto a screen. You are also quite sure that some of those present will want a printed copy of the document. You want to create a presentation that is projected with Arial font, colourful headings and a largish font size. But, for the print version, you would rather the material be optimized for black ink and in a serif (Times New Roman) font at a suitable size for print (10/12 points). Please create a stylesheet that would accomplish this.
- Document:
<link rel="stylesheet" href="screen.css" type="text/css" media="screen">
<link rel="stylesheet" href="print.css" type="text/css" media="print">
screen.css:
body {font-family: arial, sans-serif; font-size: 1.3em;}
h1 {color:red; background: white}
h2 {color: green; background: white}
h3 {color:yellow; background: white}
print.css:
body {font-family: "Times New Roman", serif; font-size: 12pt; color:black; background:white;}
- 6.You are creating an instructional website. There is a strong possibility that several people accessing your site have visual impairments. What strategy could you use - assuming that they will be using adaptive technology (screen reader, screen reading browser)?
- Using aural and braille stylesheet, but also make sure that pictures or graphics are explained.
- Optional 1a. Where should you place the @import notation?
- Within the style tag. It is used to direct the browser to load an external style sheet.
- Optional 1b. What order will a linked style sheet cascade in?
- Inline, embedded, linked, imported, browser.
- Optional 2. If you use a percentage value for margin and padding, the percentage is based on the...
- None of tese answers. The percentage is based on the width of the parent element.
- Optional 3. What are the ten media types for CSS?
- all: suitable for all devices.
aural: intended for speech synthesizers.
braille: intended for braille tactile feedback devices.
embossed: intended for paged braille printers.
handheld: intended for handheld devices (typically small screen, monochrome, limited bandwidth).
print: intended for paged, opaque material and for documents viewed on screen in print preview mode.
projection: intended for projected presentations, for example projectors or print to transparencies.
screen: intended primarily for color computer screens.
tty: intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities.
tv: intended for television-type devices