Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML How to Make a Website HTML First Build Structure

Forest Hoy
Forest Hoy
1,303 Points

How do you copy and paste code?

I was wondering because I wasn't sure what to do if I had a question. I have been re-watching the videos and found my answer but for the future I would like to know.

Kevin Faust
Kevin Faust
15,353 Points

ctrl-c and ctrl-v?

on a mac, command + c to copy and command + v to past. and to select all the text on a page use command + a

2 Answers

Are you asking how to copy/paste in general? If so, the previous answers will work---but I don't think that's what you're asking. I think you're asking how to put code into this forum:

First you type 3 backpacks (```)

Then type your code.

Followed by 3 more backticks (```)

For instance:


This is code!


Or if you'd like to use syntax highlighting, just place the language after the first set of backticks:


'use strict';

var express = require('express')
var app = express();

app.get('/', function(req, res){
    res.send("<h1>Foo bar!</h1>");
    //more code goes here




<!DOCTYPE html>
<html lang="en">
    <title>Title Here</title>
    <script type="text/javascript">
      if (foo) {
         bar(1 + 5)
    <h1>A header here</h1>
    <div id="container" class="col">
      <p>Markdown is fun.</p>


Hope that helps a little.

Forest Hoy
Forest Hoy
1,303 Points

Yeah, that does help. Thank you.