-
Book Overview & Buying
-
Table Of Contents
Web Development with Jade
By :
Since Jade is indentation-based, there are no end tags, and there are no angle brackets (<, >) to surround tags, because those are lame and ugly. The name of the tag is all that you need, and it is the first text on the line. Consider the following example:
|
Jade |
HTML |
|---|---|
p | <p></p> |
If we add another tag within the <p> block (as explained earlier), we can create a nested tag as follows:
|
Jade |
HTML |
|---|---|
p span | <p> <span></span> </p> |
Alternatively, without putting it in the <p> block, we can just create it in a way that it acts as a sibling, as follows:
|
Jade |
HTML |
|---|---|
p span | <p></p> <span></span> |
Tags are pretty boring if they don't have any content, so Jade gives us three ways of putting text in tags.
You can put the text directly after the tag name (separated by a space) as follows:
|
Jade |
HTML |
|---|---|
p Hello Word! | <p>Hello Word!</p> |
For large bodies of text, putting...
Change the font size
Change margin width
Change background colour