2016 Final Exam Flashcards

1
Q

b) Write HTML code that inserts an image as a link in a page, meaning that clicking on the image takes the user to http://www.someplace.com.

A

a href=”http://www.someplace.com”>
<img></img>
</a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

c) What is the normal flow of the Block-level elements? [2 marks]

A

boxes are laid out vertically one after the
other, beginning at the top of the containing block.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

d) Write a style rule for a <p> element that sets the margins to 2em, padding to 1em, and a black, solid 1px border.

A

p {
margin: 2em;
padding : 1em;
border: 1px solid black;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

a) Name and describe any four HTML 5 elements used for content sectioning.

A

<aside> his element represents
content that is indirectly related to the main content.

<section> his is a generic container for grouping related content.

<nav>This element designates a section containing navigation links

<article>This element defines a
self-contained piece of content.

<main>his element represents the
main content of the webpage.
</main></article></nav></section></aside>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

b) Explain the different parts of the CSS Box Model: [8 marks]

A

Content: This is the core area where the actual content of the element resides, like text in a paragraph or an image.

Padding: This is the space around the content that creates a buffer between it and the border. Padding does not affect the overall width or height of the element.

Border: This is the visual outline around the element, defined by properties like width, style (solid, dashed, etc.), and color. Borders add to the overall dimensions of the element.

Margin: This is the outer area surrounding the element, including padding and border. It creates separation between the element and other elements on the page. Margins also add to the total size occupied by the element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

c) Which attribute is used for the vertical alignment of cell content? [2 mark]

A

vertical-align

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

a) Write an HTML snippet that links a document to a CSS file named style.css. [3 marks]

A

<link></link>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

b) With a code example, describe how inline CSS could be used to format the appearance of an element in an HTML document.

A

<h1>Welcome</h1>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

c) Describe what a “web browser” is and name any browser that you know of. [3 marks]

A

A web browser is a software application that allows users to access and interact with websites on the internet. Some common web browsers include Chrome, Firefox, Safari, and Edge.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

d) What is the difference between the GET and the POST methods in HTML? [4 marks]

A

GET: Retrieves data from a server.requests can be bookmarked and cached by browsers.Appends data to the URL (visible in address bar). Limited data size due to URL length restrictions.

POST: Submits data to a server.Requests cannot be bookmarked and are not typically cached.ends data in the HTTP request body (not visible in address bar). No data size limitations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

g) What is the function of the new HTML 5 <canvas> element? [3 marks]</canvas>

A

creates a bitmap (rectangular area of pixels) on the web page. JavaScript is then used to manipulate this area, allowing for the dynamic rendering of graphics, animations, and games directly within the browser.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

d) One key issue that affect website design is Accessibility. Explain what Accessibility is.

A

Website accessibility ensures that everyone, regardless of ability, can perceive, understand, navigate, and interact with a website.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

e) Which type of image format supports transparency and interlacing but not animations?
[2 marks]

A

PNG (Portable Network Graphics)
.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

f) Identify the various parts of this style rule: [4 marks]
blockquote{
line-height: 1.5;
}

A

selector = blockquote
declaration = line-height : 1.5;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

b) What is the difference between inline and block elements? Give 2 examples of each? [6 marks]

A

inline elements flow within the line of text, only occupying the horizontal space needed for their content. They don’t start on a new line and can wrap around other inline elements.
e.g <b> <span> <a></a></span></b>

Block elements start on a new line and typically occupy the full available horizontal width by default. <h1> <p> <div>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

c) State any two circumstances where HTML Data Tables can be used. [2 marks]

A
17
Q

d) Give any factor to consider when choosing a web hosting provider. [2 marks]

A

Needs of your website:

Consider factors like traffic volume, storage space needed, and the type of applications your website will use.

Features and cost: Compare features like uptime guarantees, security measures, customer support quality, and pricing plans to find a provider that meets your needs and budget.