Here is the Solution.
(head>title>)html>body
Hope this helps.
Question
I'm using Sublime Text 2 with the Emmet plug-in.
This is the target HTML:
</html
<head>
<title></title>
</head>
<body>
</body>
</html>
This is my current snippet :
html>head>title
Which off course does not add the <body>
element.
I tried using the sibling abbreviation at the end like this:
html>head>title+body
However, the <body>
tag is now added as a sibling to the <title>
element instead of the <head>
element.
How can I update my snippet so it adds the sibling to the parent element instead?
Solution 2
Here is the Solution.
(head>title>)html>body
Hope this helps.
OTHER TIPS
I know this was answered now and I have accepted the first answer which worked for me but for completness I wanted to add the link to the actual documentation I finally found as well as another alternative to the grouping abbreviation.
As I didn't know what the character commands were called I was unable to find the documentation on them at first.
However, after some extended research (thank you google) I finally found that they are called abbreviations
.
Ones I found that I was also able to find the abbreviation syntax documentation quite quickly.
After reading the documentation I found that there was 2 ways of solving my problem.
I can use the Climb-up abbreviation ^
, similar to this:
html>head>title^body
Or I can use the Grouping abbreviation ()
to group your sets and then use the standard Sibling abbreviation +
as usual, similar to this:
html>(head>title)+body
Using the grouping abbreviation was also what Nathan Lee's answer suggested and which I accepted.
Both will generate this output:
<html>
<head>
<title></title>
</head>
<body>
</body>
</html>
If there is any benefit in using one of the other I don't know.
try this
html>(head>title)(body)
Fastest way is to use html:5 within the Koan line (bottom line). That translates to:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>