Skip to content
TheChatArchiveThe Chat Archive
Qwenqwen3-235b-a22b-no-thinking· Alibaba (Qwen)Hugging Face LMArena Human Preference 140K

Role: You are an expert full-stack web developer. Your task is to build a complete,…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Mistralmistral-medium-2505’s answer.
  1. User

    Role: You are an expert full-stack web developer. Your task is to build a complete, self-contained web application based on the user story and technical specifications below.

    Project Title: "Live Markdown Previewer"

    User Story: As a content creator, I want a simple, clean web page where I can type Markdown text in one panel and see the rendered HTML output in real-time in a second panel. The tool should be easy to use, visually appealing with a dark theme, and work well on both my desktop and mobile devices. Detailed Requirements:

    1. Core Functionality (The "What"):

      The page must have two main vertical panels.

      Left Panel (Input): A element where the user can write or paste Markdown text. It should have a placeholder like "Type your Markdown here...".

      Right Panel (Output): A element that will display the HTML generated from the Markdown in the left panel.

      Real-time Conversion: The HTML in the right panel must update automatically as the user types in the . This should be an instant, "live" preview.

      Markdown Parsing: Use the marked.js library to handle the Markdown-to-HTML conversion. You must load this library from a CDN.

    2. Layout and Styling (The "How it Looks"):

      Overall Layout: Use CSS Flexbox to create the side-by-side two-panel layout. The panels should each take up 50% of the available width and 100% of the viewport height (minus some padding).

      Responsive Design: On screen widths less than 768px (i.e., mobile devices), the layout must switch from side-by-side to a stacked, vertical layout. The Markdown input panel should be on top, and the HTML output panel below it.

      Theme: Implement a modern dark theme.

       Background: A very dark grey (e.g., #1a1a1a).
      
       Text: A light grey or off-white (e.g., #f0f0f0).
      
       Input Panel: Use a clean, monospaced font (like Fira Code, Source Code Pro, or a standard monospace).
      
       Output Panel: Style the rendered HTML for readability. For example:
      
           <h1>, <h2> tags should be a distinct color or have a bottom border.
      
           <code> blocks should have a slightly different background color (e.g., #2b2b2b) and padding.
      
           Blockquotes (<blockquote>) should be indented and have a left border.
      

      Headers: Each panel should have a simple title: "Markdown" for the left and "Preview" for the right.

    3. Technical Specifications (The "How to Build It"):

      Single File: All HTML, CSS, and JavaScript must be contained within a single index.html file. Use internal and tags.

      No Build Tools: The final code must run directly in a web browser without needing any build steps, package managers (like npm), or local servers.

      External Library: Load marked.js from its official CDN link within the of the HTML document.

      Code Quality: Your code should be well-commented, especially the JavaScript section, to explain the logic for capturing input and updating the preview.

  2. Qwen Assistant

    Here's a complete, self-contained HTML file that implements the Live Markdown Previewer as described in your user story and technical requirements.

    You can copy this code into an index.html file and open it directly in any modern browser — no build tools or servers required!


    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8" />
      <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
      <title>Live Markdown Previewer</title>
    
      <!-- Load marked.js from CDN for Markdown parsing -->
      <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
    
      <style>
        /* Base Reset & Theme */
        * {
          margin: 0;
          padding: 0;
          box-sizing: border-box;
          font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
    
        body {
          background-color: #1a1a1a;
          color: #f0f0f0;
          height: 100vh;
          display: flex;
          flex-direction: column;
        }
    
        h2 {
          padding: 1rem;
          font-weight: normal;
          font-size: 1rem;
          background-color: #2d2d2d;
        }
    
        main {
          display: flex;
          flex: 1;
          overflow: hidden;
        }
    
        textarea, .preview {
          width: 50%;
          padding: 1rem;
          resize: none;
          font-size: 1rem;
          line-height: 1.6;
          border: none;
          outline: none;
        }
    
        textarea {
          background-color: #1a1a1a;
          color: #f0f0f0;
          font-family: 'Fira Code', monospace, monospace;
          height: 100%;
          overflow-y: auto;
        }
    
        .preview {
          background-color: #242424;
          color: #f0f0f0;
          overflow-y: auto;
        }
    
        /* Responsive Design */
        @media (max-width: 768px) {
          main {
            flex-direction: column;
          }
    
          textarea, .preview {
            width: 100%;
            height: 50vh;
          }
        }
    
        /* Rendered Markdown Styling */
        .preview h1,
        .preview h2 {
          border-bottom: 1px solid #444;
          color: #00bcd4;
        }
    
        .preview code {
          background-color: #2b2b2b;
          padding: 0.2em 0.4em;
          border-radius: 3px;
          font-family: monospace;
        }
    
        .preview pre code {
          display: block;
          padding: 1rem;
          white-space: pre-wrap;
          word-wrap: break-word;
        }
    
        .preview blockquote {
          border-left: 3px solid #555;
          margin-left: 1rem;
          padding-left: 1rem;
          color: #ccc;
          font-style: italic;
        }
    
        .preview ul,
        .preview ol {
          margin-left: 1.5rem;
        }
    
        .preview a {
          color: #2196f3;
          text-decoration: underline;
        }
    
        .preview img {
          max-width: 100%;
        }
      </style>
    </head>
    <body>
    
      <main>
        <!-- Left Panel - Markdown Input -->
        <div class="input-panel">
          <h2>Markdown</h2>
          <textarea id="markdown-input" placeholder="Type your Markdown here..."></textarea>
        </div>
    
        <!-- Right Panel - HTML Output -->
        <div class="output-panel">
          <h2>Preview</h2>
          <div id="preview-output" class="preview">Start typing Markdown on the left to see the preview here.</div>
        </div>
      </main>
    
      <script>
        // Get references to DOM elements
        const markdownInput = document.getElementById('markdown-input');
        const previewOutput = document.getElementById('preview-output');
    
        // Function to update the preview with rendered Markdown
        function updatePreview() {
          const rawMarkdown = markdownInput.value;
    
          if (rawMarkdown.trim() === '') {
            previewOutput.innerHTML = 'Start typing Markdown on the left to see the preview here.';
          } else {
            // Use marked.js to convert Markdown to HTML
            previewOutput.innerHTML = marked.parse(rawMarkdown);
          }
        }
    
        // Add event listener to input field
        markdownInput.addEventListener('input', updatePreview);
    
        // Initialize preview with empty message
        updatePreview();
      </script>
    </body>
    </html>
    

    ✅ Features Implemented:

    • Two vertical panels using Flexbox
    • Real-time Markdown-to-HTML rendering using marked.js
    • Dark theme with readable typography and syntax styling
    • Responsive layout for mobile devices
    • Clean, accessible design
    • Self-contained – works offline after loading once

    📌 Notes:

    • The marked.js library is loaded via a CDN.
    • All logic is handled inline in the <script> tag.
    • You can enhance this later by adding GitHub-flavored Markdown, sanitization, or export options.

    Let me know if you'd like enhancements like:

    • Exporting the rendered HTML or Markdown
    • Syntax highlighting (e.g., with highlight.js)
    • Saving to local storage
    • Toolbar buttons for common Markdown formatting

    Happy coding! 🧑‍💻

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.