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! While you're at it, check out some resources Treehouse students have shared here.

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

I'm trying to create an HTML snippet in Atom that creates an HTML page template when I type "html" + tab key.

Youtube tutorial I used: "2.1 Bonus: Creating HTML Snippets with Atom | Zero To 100 Web Development" by David Shack

Posted below is my snippets.cson file. What am I doing wrong? Instead of posting the entire template (with all the html, head, title, and body tags) , the "html" + tab key only posts the opening and closing html tags in my html file.

'.text.html.basic':
  'HTML5':
    'prefix': 'html'
    'body': """
       <!DOCTYPE html>
       <html>
          <head>
             <title></title>
          </head>
          <body>
          </body>
       </html>
    """

This is what I want to get with the "html" + tab key shortcut:

<!DOCTYPE html>
<html>
  <head>
    <title></title>
  </head>
  <body>
  </body>
</html>

Instead, I'm getting this:

<html></html>

2 Answers

mayleks
mayleks
5,957 Points

Make sure the extension of the file is .html

The shorthand is "!" + tab without quotes.

Thank you so much!!! :)