Multiline input

2 snippets across 2 stacks — Bash & Linux, HTML & CSS

SHBash & Linux

Here Document

SH · Redirects & Pipes
syntax
command <<DELIMITER
text
DELIMITER
example
cat <<EOF > /etc/nginx/conf.d/app.conf
server {
    listen 80;
    server_name app.example.com;
    location / {
        proxy_pass http://localhost:3000;
    }
}
EOF

# Suppress variable expansion:
cat <<'EOF'
Use $HOME to reference your home directory
EOF

Note Variables and commands are expanded inside a here document by default. Quoting the delimiter ('EOF') disables expansion, which is useful when writing scripts or config files that contain $ characters. <<- strips leading tabs (not spaces) for cleaner indentation.

HCHTML & CSS

Textarea

HC · Forms
syntax
<textarea name="field" rows="n" cols="n"></textarea>
example
<label for="message">Your Message:</label>
<textarea id="message" name="message" rows="5" cols="40" placeholder="Type your message here..." maxlength="500"></textarea>

Note Unlike input, the textarea value goes between the opening and closing tags, not in a value attribute. Use the CSS resize property to control whether users can resize it.