Introduction: How to Enhance Your Instructables Using HTML
Instructables are an awesome way to share your knowledge and learn from others. Sometimes, a lot of text in an Instructablecan be intimidating, or an Instructable just doesn't look very interesting. To solve this, you can use HTML and CSS.
HTML is useful for organizing your instructable into sections (read more on Wikipedia).
This includes things like: lists, simple text formatting, links, tables, and much more.
CSS is used to make the HTML look appealing and easier to read (more info on Wikipedia).
This includes things like: spacing, color, font, alignment, backgrounds, and much more.
Thanks to theedisoneffect for suggesting the creation of this Instructable.
NOTE: Sorry mobile users, most of this stuff only works on a computer :-(
Step 1: What You'll Need
There is only one requirement for this instructable: an Instructables account.
There are a few ways to get a pro account:
- Getting it gifted to you. Send someone else a pro membership!
- Earning one through a featured Instructable: Get started
Use this as encouragement to make an Instructable if you haven't already! =)
Step 2: Putting Code Into Your Instructable
The code box with the Arduino blink example sketch:
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
This box is formatted using the pre tag to: keep whitespace as is, use the same font Arduino does, set the width to 600px, set the height to 300px, make the font size 11px, create a grey border, and create a light grey fill.
Step 3: Tables
Tables are super useful as a materials organizer or to display data. HTML organizes tables using a variety of tags:
Tag | Description |
---|---|
<table> | Table: Defines the beginning and end of a table |
<tbody> | Table body: An optional tag to define the body of a table |
<tr> | Table row: Creates a new row in the table |
<th> | Table header: Defines the header of a column |
<td> | Table data: Defines a normal cell |
Example (with a bit of CSS to spice things up):
Part | Source |
---|---|
2x 10KΩ resistors | Sparkfun, RadioShack |
2x 220Ω resistors | |
2x 10-47µF capacitors | |
2x LEDs | |
2x PNP transistors |
~~ = This common part can be salvaged from almost anything
~~ = You can salvage this, or if it's bought, there will be leftovers
Step 4: Forms
Step 5: Linking Between Steps
In HTML, there is something called an anchor, which is a link that scrolls to a certain element on the screen. It searches the document for the ID you are looking for and scrolls to it for you!
Input | Output |
---|---|
<p id="hello">This is a paragraph with the id "hello."</p> | This is a paragraph with the id "hello." |
<a href="#hello" rel="nofollow">This link sends you to "#hello"</a> | This link sends you to "#hello" |
Note: Instructables' menu bar cuts off the top 100px of the page.
The most practical use for an anchor is to reference other steps within your (or someone else's) Instructable:
This scrolls to "#comment-list"
This scrolls to "#step10" of my Fingerprint Scanning Garage Door Opener Instructable
Step 6: Organize Substeps
The fieldset tag is a great way to organize anything from materials to creating a code section at the bottom of a step.
For example:
Step 7: Using the Premade Stylesheets or Bootstrap
There are many preformatted classes you are allowed to use on Instructables.com's stylesheets (here) or anything from Bootstrap v2.3.2 (documentation here).
Some of the useful classes:
Class Name | Use | Example |
---|---|---|
btn | Style text as a button | Button |
img-polaroid | Polaroid image | ![]() |
callout | To comment on something. I can't think of another use for this, but there are definitely more | Text More text |
How to define a class in HTML:
<p class="CLASSNAME">Styled text goes here</p>
Additionally, there is an added font for you to use:
Name of Font | How to use it |
---|---|
Complete In Him Pro | <p style="font-family:CompleteInHimPro;">Complete In Him Pro</p> |
Step 8: HTML Gauge
If you've ever needed a gauge to show difficulty, cost, some sort of data, etc., this is what you're looking for!
Difficulty: easy..
Step 9: List of Supported HTML Tags
HTML has many tags, but only a few are allowed to be used in an Instructable. I have done my best to show all of the useful supported tags below, but if I missed any, be sure to let me know!
Input Tag | Output |
---|---|
<button> | |
<img> | ![]() |
<samp> | Sample computer output |
<font> | Warning: "Font" is an outdated tag But, this is the only way to color text on mobile |
<fieldset> | See step 6 |
<form>,<select>,<option> | See step 4 |
<pre> | See step 2 for a possible use |
<a href="URL"> | A link to my last Instructable See step 5 for another use |
<sup> | Normal text This text is superscripted |
<sub> | Normal text This text is subscripted |
<strong> or <b> | Normal text This text is strong (bolded) |
<em> or <i> | Normal text This text is emphasized (italicized) |
<u> | Normal text This text is underlined |
<blockquote> | Normal textThis text is in a blockquote |
<h1>, <h2>, ..., <h6> | h1h6 |
<code> | This can be used to show code (see step 2 for another way) |
<ul> |
|
<ol> |
|
<table>, <tr>, <th>, <td> | See step 3 |
<hr> | Some text above the horizontal rule Some text below the horizontal rule |
<span> | This can be used to style something or apply a class to text. But, a class must be defined (it can be one that doesn't exist yet) |
For more information about the tags you should check out w3schools. This gives information about all of the HTML tags and how to use them.
Step 10: Styling With CSS
CSS is where stuff gets cool! You can do A LOT of different things with CSS, with only a very few being listed here.
CSS Code | Example | Description and Notes |
---|---|---|
cursor:move; | This text is styled | Changes the cursor's look |
color:red; | This text is styled | Changes the color of text Check out this page for predefined color names |
font-size:1.2em; | This text is styled | Sets the size of text Can be used in these formats |
font-family:Lucida Console; | This text is styled | Determines the font of text Click here for more fonts |
height:120px; width:120px; | This text is styled | Defines the dimensions of the element (background is outlined in black) |
padding:5px; | This text is styled | Leaves space around an element (background is outlined in black) |
overflow:auto; height: 10px; | This text is styled | Creates a scrollbar if the text extends beyond the defined height and/or width |
border:2px solid grey; | This text is styled | Creates a border More info about the border property here |
background-color:#C6D7DE; | This text is styled | Changes the background color |
text-align:center; | This text is styled | Aligns the text to the right, center, or left |
text-decoration:underline; | This text is styled | Underlines or overlines text |
text-shadow:2px 2px 1px red; | This text is styled | Creates a shadow based on the text More info on the text-shadow property here |
font-variant: small-caps; | This text is styled | Makes every character uppercase, but smaller. |
Using inline CSS:
<p style="CSS_CODE_HERE">Styled text here</p>
Step 11: Example Instructable
This mini Instructable uses a few of the items you have learned. The steps are separated using multiple fieldset tags. The pictures are inserted using the img tag.
Attachments
Step 12: Conclusion and References
Learning everything in this Instructable at once is almost impossible. This was created to inspire the use of HTML/CSS in your Instructable, and as a reference if you do use them.
Because there is so much to cover, I may have missed something or didn't explain something very well, so please ask questions or leave feedback!
References:
- W3schools HTML tag reference
- W3schools CSS property reference
- W3schools TryIt editor (try your code before putting it in an Instructable)
- Instructable.com's stylesheet
- Another stylesheet
Thanks for reading! =D
78 Comments
9 years ago on Introduction
Hey Noah,
AWESOME Instructable! Gonna definitely use it in my next instructable!
Just wondering, but I noticed the background on both this instructable, and your me page changes colourwhen you hover over it?! How do you do that???
Keep up the great work :D
- Ricky
Reply 9 years ago on Introduction
-First, you will need someone to comment on the Instructable you want to change (or your Orangeboard).
-Next, go to your backtalk page and click reply next to the comment.
-Through this reply you can click on "rich editor", then source.
-Finally use a style tag to write in CSS.
My CSS:
Reply 9 years ago on Introduction
Wow thanks for the tip. I too was wondering how you changed your orangeboard. How did you even figure out how to find all of that??
Reply 9 years ago on Introduction
It was integrated automatically using the old editor, so when I saw the old editor on the balktalk page, I was like "Hey! I can use a style element in this!" =D
2 years ago
The link to "Buy" a Pro membership does not seem to be operational anymore. :(
5 years ago
This is going to be very useful. Thank you for your investigations and instructable!
5 years ago
Sweet! Loving the instructions. You got any advice for inputing formulas? Haven't come up with something othe rthan embedding pictures
Reply 5 years ago
I think that's probably the best and easiest way, especially if you use a tool like this: http://www.codecogs.com/eqnedit.php
6 years ago
hi i was just wondering if you still check out this instructbale and would be willing to awnser some questions?
Reply 5 years ago
Also, there seems to be a lot of changes to Instructables recently, so some things may not work as well.
Reply 5 years ago
I'm good now, thanks though!
Reply 5 years ago
I know it's a bit late, but let me know if you still have questions!
7 years ago
Does the Instructables Editor also support CSS?
Reply 7 years ago
It doesn't support the <style> tag, but some inline css is allowed, as seen in step 10.
Also, as seen in step 7, you can search through the pre-made classes with the style you want and use that.
Hope this helped!!
7 years ago
Does anybody knows how to strikethrough text?, html editor doesn't seems to work with <del> , nor <s>.
Reply 7 years ago
Using < s >
Test
Using style="text-decoration:line-through;"
Test
Reply 7 years ago
Thanks, i´ll check it later
7 years ago
I come here before I publish anything Awesome instructable!
Reply 7 years ago
Thanks!
8 years ago
Is there a way that i can make a coloured rectangular box with text in it?