Week 2 Flashcards
Characterise the type of data stored in the head
element and the type of data stored in the body
element? (2)
The head element contains metadata. This is information pertaining to the page itself. This could be a title (which appears at the top of the screen or JS src files). The body contains block elements. These are structured using HTML and contain the actual content of the page to be displayed
What are the main characteristics of block elements?
2
Block elements contain content. They fill the entire space of the parent (they stretch as far left and right as possible). Block elements can contain other block or inline elements. “<p> </p>” and “<div> </div>” are examples of block elements.
What are the main characteristics of in-line elements
(2) With examples.
Inline elements only take up as much space as necessary, in other words they only take up the space between the outer element tags. An example of an inline element would be “<span></span> and <img></img>”
f) “You can visit Monash here if you like.” – Code the above in HTML (2)
<p>"You can visit Monash <a>here</a> if you like."</p>
If you add a to an existing in a
what will be the result? (2)
It will create a reserve space for a new column for all rows in the table.
What should a table be used for? (2)
What should it not be used for? (2)
What should be used instead? (2)
A table should be used to represent data . Should not be used for layout.
A series of div-like semantic elements such as footer, section, form.
Q3
a) How do current browsers render (display) the new
div-like semantic elements? (2)
b) Do they attach any semantic meaning to them? (2)
Current browsers display div-like semantic elements like normal divs. There is no semantic meaning to them, they are just easier for developers to use.
Q3
c) Adobe are abandoning their Flash development
platform and browser plug-in?
What will replace them? (2)
d) Why is this replacement a better alternative? (2)
HTML5, CSS and Javascript will replace flash. These are better alternatives because they are open source. This means that no one company owns the code and updates can be achieved much quicker than proprietary software.
Additionally they are better due to plug-ins not being required.
Q3 e) Why is non-trivial client side storage
(beyond cookies) an important issue for
Web applications if they are to act like
desktop or native mobile apps? (2)
Desktop or native mobile have a key advantage as they can easily store data on the client side. Mobile web apps need this functionality in order to behave like native apps so that they can reassess a page and reuse the data previously loaded.
Q4
a) What is the WHATWG’s attitude towards an HTML
standard (2)
b) Main reason why? (2)
WHATWG believes that the HTML should be a living standard. What this means is that it should continue to remain open source so that updates can be done quickly and that it should support many different coding methods. Continuous update without version #.
Q4
c) What is the W3C’s attitude towards an HTML
standard (2)
d) Main reason why? (2)
W3C’s view is that there should be more strict rules and updates (i.e. version number). You can choose what version you want. You will know what browsers are compatible with each browser. Same syntax across all platforms.
Q5
a) CSS can be used to apply a consistent style across all pages in a Web site. How? (2)
CSS is a separate document to the HTML file. It is only linked once and this ensures that any changes that are made in the CSS file are automatically and consistently applied to the HTML file.
Q5 b) The data and structure of an HTML page could be styled differently by several stylesheets to be
appropriate for different devices (laptop, phone). – What features of CSS allow this to be done by a single
stylesheet? (2)
The main feature that allows the data and structure of an HTML page to be styled differently is having relative sizes. This means that it takes a percentage or proportion of the size available instead of taking an absolute value.
Q5 c) Contrast the use of an element selector and a class selector. (2)
An element selector is used to identify a single element, whereas a class selector selects multiple elements that share the same class, to be styled in a certain way.
Q5 d) A CSS is made up of style rules. What are the 3 components of a style rule? (2)
Selector prompt and value