To Lecture Notes

IT 212 -- Apr 16, 2025

Review Exercises

  1. Find the errors in the source code files contained in this project:
         meters-to-ft-in.zip.
    Answer: here is a zipfile of the corrected project.
  2. Create a textfield that has rounded corners. Also, add a placeholder attribute to the textfield.
    Answer:
    Source code:
    <input type="text" value="Larry" placeholder="Enter name:"
           style="border-radius: 15px; width: 150px; height: 15px;">
    
  3. We know how to create a button that looks like this:

    <input type="button" value="Push Me">
    
    How does a button created with a <button> element differ from a button created from an
    <input> element?
    Answer:
    <button>
        Push Me
    </button>
    
    The advantage of using the button tag is that HTML markup can be included, for example:
    <button>
        <strong>Push Me</strong>
    </button>
    
    The <strong> element changes its contents to bold font.
  4. We use entities to display special characters on a web page. Try displaying the greek letters alpha (α), beta (β), and gamma (γ) in a paragraph, a textarea, and the title. However, entities do not work in prompt or alert boxes. For these boxes, use these hex unicode escape characters instead: \u03B1, \u03B2, \u03B3. Check out the website unicode.org to find the codes of the special characters that you need. Answer: here is a sample website that displays these characters.
    <!DOCTYPE html>
    <html lang="en">
        <head>
            <title>&alpha; &beta; &gamma;</title>
            <script>
            var values = prompt("Enter values for \u03B1, \u03B2, \u03B3.");
           alert("\u03B1, \u03B2, \u03B3");
            </script>
        </head>
        <body>
            <p>&alpha; &beta; &gamma;</p>
            <textarea>&alpha; &beta; &gamma;</textarea>
        </body>
    </html>
    

Expression Interpolation

Comparisons for Equality

Practice Quiz

Functions vs. Methods

Project 2a

Arrays

Properties and Methods