180 likes | 272 Views
Key question. What are the three standardized core languages used to implement web pages? Write the full name not the abbreviation and describe the “layer” that the language implements. Key question.
E N D
Key question • What are the three standardized core languages used to implement web pages? Write the full name not the abbreviation and describe the “layer” that the language implements.
Key question • What are the three “tiers” of web application development. Describe each “tier” and list some of the languages used for each of the “tiers.”
Key Concept Questions: True or False • jQuery is a JavaScript library • CSS is an extension of HTML. Explain. • HTML can be used to change the appearance of a website. Explain. • HTML should be used to control the appearance of a website. Explain. • CSS alone can be used to make a web page interactive, i.e., user interaction can change the appearance of a website.
Show an example of how CSS can make a page interactive • a {color: black} • a:hover {color: red; font-weight: bold}
HTML questions • Which HTML tag defines an item in a list? • Which HTML tag defines a list that uses bullets instead of numbers? • Which HTML tag defines a numbered list? • Which HTML tag contains the title and character set of a web page?
CSS questions • Which CSS attribute makes text bold? • How do you use CSS to make a <div> centered? • What is the difference between the CSS color attribute and background-color attribute? • Write the CSS code to make list items bold but only if the list items are inside of a <nav> tag: • Write the CSS code to center the text of paragraphs but only if the paragraph is in a <div> tag with the class name “center”:
Use CSS to make a <div> centered? • div {margin: 10px auto} • div {margin: 10px auto 5px} • div {margin: 10px auto 5px auto}
Context specificity • Write the CSS code to center the text of paragraphs but only if the paragraph is in a <div> tag with the class name “center”: div.center p { text-align: center; } section div p { text-align: left; }
navul li { font-weight: bold; color: red; border: 1px solid blue; • }
Which of these is jQuery • A. document.getElementById(“intro”); • B. var x = 3; • C. $(“#intro”).html(“hello”); • D. #intro { color: red };
What is wrong with this code • HTML: • <button>OK</button> • <button>Cancel</button> • jQuery: • $(“button”).click( submit() );
Identify: PHP, JavaScript, jQuery, SQL, HTML, or CSS • echo “<h1>Title</h1>”; • <input value=“<?php echo $x ?>” type=“text”> • $result = run_query(“SELECT * FROM Users”);
Identify: PHP, JavaScript, jQuery, SQL, HTML, or CSS • <p style=“margin: 50px”>This is a paragraph with big margins</p> • <input type=“submit” onclick=“myFunction()”> • .important { font-weight: bold;} • $(“.important”).css(“color”, “red”);
Identify: PHP, JavaScript, jQuery, SQL, HTML, or CSS • $("#sportlink").attr("href","http://www.espn.com"); • $("#red").attr(”style",”color: red");
Why is JavaScript better than CSS for implementing interaction?
AJAX varxmlhttp =new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { var content = xmlhttp.responseText; document.getElementById("myDiv").innerHTML = content; } } xmlhttp.open("POST","example2.php",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("first=Eric&last=Breimer");