To Lecture Notes

IT 238 -- Jan 8, 2025

Review Questions

  1. Suppose your name is Emma Saldana with CampusConnect username esaldan5. What folder structure should you use on the studentweb server to display the HTML file index.html? Which URL should you use to view this page?
    Answer: use this folder structure:
    public_html
        it238
            index.html
    
    Use this URL:
    https://studentweb.cdm.depaul.edu/esaldan5/it238/index.html
    
  2. Set up an HTML page that uses some of the HTML tags that you know. Use more HTML tags than you did for Exercise 3 in the Jan 6 Notes. Add an external stylesheet. Answer:
    Exercise2 Example
    Web Page 1   Web Page 2   Source Code
    Use this folder structure for uploading to the studentweb server:
    public_html
        it238
            index.html
            page2.html
            styles.css
            images
                puppy.jpg
    
  3. How can you use Visual Studio Code to create a skeleton web page?
    Answer: starting with an empty HTML page, type exclamation mark (!), then tab
  4. How do you submit projects to D2L for IT 238?
  5. Which colors are designated by these hex color codes:
    #ff00ff  #800080  #0000ff  #000080  #800000  
    #008080  #c0c0c0  #e0e0ff  #e0ffff
    
    Hint: Here is a color wheel to help you.
    Answer:
    #ff00ff magenta or fuschia #800080 purple
    #0000f0 blue               #000080 navy
    #800000 maroon             #008080 teal               
    #c0c0c0 silver             #e0e0ff pastel blue        
    #e0ffff pastel aqua or cyan (blue green)
    
  6. What does this CSS statement define?
    .twf { font-family: "Courier New"; 
           font-weight: bold; }
    
    Answer: This is a CSS class. The leading dot on the class name .twf indicates that this class can be applied to any HTML element. For example, in the HTML code, to apply this class to the tag <p> (paragraph), add a class attribute to the tag:
    <p class="twf">This is a paragraph.</p>
    
  7. What is the CSS box model?
    Answer: The box model controls how much space is between an element and its border (padding) and the space between its border and adjacent elements. Here is an example:
    BoxModel Example
    Web Page   Source Code
  8. How do you write comments in HTML, CSS, and JavaScript code?
    Answer:
    <!-- This is an HTML comment -->
    /* This is a CSS comment */
    // This is a JavaScript comment
    

Practice Quiz

Project 0

CSS Shorthand Styles

Some HTML5 Examples

We did not discuss the details of these examples in class. Look at them on your own.

  1. Details Example
    Use a details element to hide information:
    Web Page  Source Code
  2. Table Example
    A table with HTML5 elements:
    Web Page  Source Code
  3. Iframe Example
    Use an <iframe> tag to display text:
    Web Page  Source Code
  4. Drawing1 Example
    Draw two shapes (circle and polygon) using scalable vector graphics (SVG).
    Web Page  Source Code
  5. Drawing2 Example
    Drawing can also be accomplished using JavaScript:
    Web Page  Source Code

Some CSS Examples

  1. AbsolutePositioning Example
    Display div sections using absolute positioning and a background image.
    Web Page  Source Code
  2. Float Example
    Use the CSS float property to allow text to flow around an image.
    Web Page  Source Code

How are CSS Property Values Applied?