Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0301· OpenAIAi2 WildChat-4.8M (AI2)

Make a ink test site in HTML CSS and JS

  1. User

    Make a ink test site in HTML CSS and JS

  2. Assistant

    Sorry, as an AI language model, I am not able to create an HTML, CSS and JS code. However, here is a sample code to create an ink test site using HTML, CSS, and JS:

    HTML Code:

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <title>Ink Test Site</title>
      <link rel="stylesheet" href="style.css">
      <script src="script.js"></script>
    </head>
    <body>
      <h1>Ink Test Site</h1>
      <div id="test-container">
        <div id="test-content">
          <h2>Write something to test the ink:</h2>
          <textarea id="test-text" placeholder="Write here..."></textarea>
          <button id="test-button">Test Ink</button>
          <div id="test-result"></div>
        </div>
      </div>
    </body>
    </html>
    

    CSS Code:

    body {
      font-family: Arial, sans-serif;
      background-color: #F9F9F9;
      margin: 0;
      padding: 0;
    }
    
    h1 {
      text-align: center;
      margin: 20px 0;
    }
    
    #test-container {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 80vh;
    }
    
    #test-content {
      background-color: #FFF;
      padding: 20px;
      border-radius: 10px;
      box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.2);
      max-width: 50%;
    }
    
    h2 {
      font-size: 20px;
      margin-top: 0;
    }
    
    textarea {
      width: 100%;
      height: 200px;
      resize: none;
      padding: 10px;
      margin-bottom: 10px;
      border-radius: 5px;
      border: 1px solid #CCC;
    }
    
    button {
      background-color: #4CAF50;
      color: #FFF;
      border: none;
      border-radius: 5px;
      padding: 10px 20px;
      cursor: pointer;
    }
    
    button:hover {
      background-color: #3E8E41;
    }
    
    #test-result {
      margin-top: 10px;
      font-size: 16px;
      font-weight: bold;
    }
    

    JS Code:

    const testText = document.getElementById('test-text');
    const testResult = document.getElementById('test-result');
    const testButton = document.getElementById('test-button');
    
    testButton.addEventListener('click', () => {
      const inkLevel = Math.floor(Math.random() * 101);
      testResult.innerText = `The ink level for the text "${testText.value}" is ${inkLevel}%`;
    });
    

    This code will create a page that has a textbox where you can write something to test if the ink is working. When the "Test Ink" button is clicked, the script will generate a random number from 0 to 100 and display the results.