CSC 216 Assignment 2 Question and Answer

CSC 216 Assignment 2 Question and Answer

Assignment Update
Course Code; CSC 216.
Course Title; Internet Programming.

CSC 216 Assignment
  1. Explain the major importance of CSS to Internet Programing.
  2. Write a program that allows a student to do the following
    i. Fill His/Her name.
    ii. Select His/Her Country/Local Government of origin.
    iii. Make a choice through a check box of any hair style of his/her choice.
  3. Write a simple program using a HTML or CSS that allows a poor student to select the price of his/her book.

Answers

1: Explain the major importance of CSS to Internet Programing?

  1. Separation of concerns: CSS separates the content of a web page from its presentation. This makes it easier to maintain and update a website without affecting the underlying HTML content.
  2. Consistency: CSS allows developers to define styles that can be applied consistently across all pages of a website. 
  3. Flexibility: In terms of how a web page can be styled. Developers can use CSS to create complex layouts, use custom fonts, and add animations and other effects.
  4. Responsive design: CSS is essential for creating responsive web designs that adapt to different screen sizes and devices. 
  5. Accessibility: CSS can be used to make web pages more accessible to users with disabilities. For example, developers can use CSS to increase the font size, change the colors of links, and add alt text to images.

Write a program that allows a student to do the following
i. Fill His/Her name.
ii. Select His/Her Country/Local Government of origin.
iii. Make a choice through a check box of any hair style of his/her choice.

<!DOCTYPE html>
<html>
<head>
    <title>Students Details</title>
    <style>
        label{
            display: block;
        }
        
    </style>
</head>
<body>
    <form action="#">
    <label for="name">Name:</label>
    <input type="text" id="name" name="name">

    <label for="country">Country:</label>
    <select id="country" name="country"> 
<option value="">Select a country</option>

      
<option value="Nigeria">Nigeria</option>
</select>

<label for="hairstyle">Hairstyle:</label>
<input type="checkbox" id="hairstyle" name="hairstyle" value="Long hair"> Long hair
<input type="checkbox" id="hairstyle" name="hairstyle" value="Short hair"> Short hair

<br>
<button type="submit">Submit</button>
    </form>
</body>



</html>

3: Write a simple program using a HTML or CSS that allows a poor student to select the price of his/her book.

<!DOCTYPE html>
<html>
<head>
  <title> Studentsdash - Book Price Selector</title>
      <!--CSS  CODE-->

  <style>
    body {
      font-family: sans-serif;
    }

    select {
      width: 100%;
      margin-bottom: 10px;
    }

    button {
      background-color: blue;
      color: white;
      padding: 10px 20px;
      cursor: pointer;
    }
  </style>
</head>
<body>
    <!--HTML CODE-->
  <h1>Book Price Selector</h1>

  <form action="#">
    <label for="book_price">Select the price of your book on sdash:</label>
    <select id="book_price" name="book_price">
      <option value="0">Free</option>
      <option value="1">100</option>
      <option value="2">200</option>
      <option value="3">300</option>
      <option value="4">400</option>
      <option value="5">500</option>
    </select>

    <button type="submit">Select</button>
  </form>
</body>
</html>

THE END

Hey, Share with your friends.

The goal is to graduate together

Emmy.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *