Question:
(a) An HTML file "decor.html" uses an external Cascading Style Sheet file name "nicedesign.css". Users are viewing the Web page making use of different kinds of browsers. The version for those browsers also varies. Give the appropriate Browser Sniffer codes which enable you to use the file "nicedesign.css" within the file "decor.html" only if the browser is Internet Explorer 5 or above.
(b) Give extract codes about how Cascading Style Sheets can be used to control the appearance of hyperlinks.
(c) (i) Describe fully how the CGI architecture operates. Illustrate your answer using a diagram.
(ii) Explain the POST and GET methods with respect to the above architecture.
(d) Explain and illustrate with the aid of an annotated sketch what will be the output when the following codes are loaded into a browser:
< script language="JavaScript">
var valX = 5, valY ;
while ( valX >= 1 ) {
valY = 1 ;
while ( valY <= 5 ) {
document.write( valX % 2 == 1 ? "?" : "@" );
++ valY;
}
-- valX;
document.writeln( "
" );
}
< /script>