Explore the basic syntax of Pug.
- [Instructor] First of all, to avoid confusion,…not so long ago, Pug was named Jade.…It had to change its name because of corporate reasons,…but it's still often referred to as Jade.…Let's cover the basic concepts…and most important elements of Pug.…In Pug, white spaces are used…to describe the structure of a document.…This means everything that is indented under an element…and there you have to use always the same indents…like one tab or two spaces,…will be within this element,…as you see here with HTML, head and body.…
At the same time, it's also valid to put the text…that should go into an element right next to it,…as you see for title and h1.…For plain text, if written below a tag,…it has to be preceded with a pipe…so that Pug knows that this is not some HTML markup.…You see that at the paragraph element.…HTML tags are, as you see here, written as they are,…just without the greater than and lesser than character.…CSS classes are written with a preceding dot,…very much as they are defined in CSS.…
Similarly, CSS IDs are expressed with the hash key.…
- Creating a server with Express and pure Node.js
- Handling errors in Express
- Creating routes
- Using templates
- Working with the Pug template engine
- Implementing the site structure and logic
- Working with conditionals
- Dealing with POST requests
- Sanitizing user inputs and handling form errors
Skill Level Beginner
What you should know1m 40s
1. Getting Started
2. Express Basics
3. Getting Started with Our Project
4. Getting Started with Templates
5. Implementing the Site Structure and Logic
6. Handling Form Data
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.