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 HTML Basics Getting Started with HTML Global Structure of an HTML Document

I don't get it, How do I get a boilerplate code from the snippets?

I tried the snippet in the sublime text but found something I didn't understand. If you need it then I post it for you.

Hello, ${1:this} is a ${2:snippet}.
    <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
    <!-- <tabTrigger>hello</tabTrigger> -->
    <!-- Optional: Set a scope to limit where the snippet will trigger -->
    <!-- <scope>source.python</scope> -->

2 Answers

Its the teachers notes for the video. The Sublime snippet is listed as: *Update - scratch this note, see below for update *

    <content><![CDATA[Type your snippet here]]></content>
    <!-- Optional: Tab trigger to activate the snippet -->
    <!-- Optional: Scope the tab trigger will be active in -->
    <!-- Optional: Description to show in the menu -->
    <description>My Fancy Snippet</description>

I'd say check your content against the rules listed below the snippet syntax for the desired result and tinker with it a little. I prefer Visual Studio Code and the snippets there are bit simpler.

Got it - needed to rewatch the video to understand where your question was stemming from.

To add the generic html snippet from Sublime do the following:

  • Goto your editor.
  • create a new file and save it fileName.html.
  • in the new file just type html then press TAB immediately after.

The editor will render the following code to get you rolling.:

<!DOCTYPE html>


You fill in the rest. For clarification, this is same as it is in VS Code. The method you posted above is how you would create a snippet of your own. This helps if you've created a piece of code and reuse it frequently and would work in the same way. Hope this helps to clear it up a little.

If not add more info and someone else can assist. Have fun!

Hey, thanks a lot for your effort NiKole Maxwell, I really appreciate it...