Register to get access to free programming courses with interactive exercises

Introduction HTML: Preprocessor Pug

Page markup is one of the most arduous processes for any developer. It's not the complexity of markup itself, its implementation, opening and closing tags, unseparated templates in components, the visual issue in determining to what degree one section or another is nested, etc. To solve these problems, HTML preprocessors, interpreters that translate markup from their language to HTML, were invented.

In this course, we'll study the popular Pug preprocessor, which will help us learn:

  • How to not duplicate markup
  • How to use templates
  • How to divide templates blocks and put them into separate files
  • How to connect additional modules to process information in other formats
  • How to use JavaScript to add logic when working with templates
  • How to work with conditional constructs

It will allow you to write maintainable code and automatically translate it into plain HTML.

Practice

Many of the lessons in this course will include a practice section with a web view. It's a good idea to do more than complete the task. Once you've finished, try experimenting with the code and the features you've learned.

During the course, you'll come across independent tasks. If necessary, you can use it in the assignments to practice.


Are there any more questions? Ask them in the Discussion section.

The Hexlet support team or other students will answer you.

About Hexlet learning process

For full access to the course you need a professional subscription.

A professional subscription will give you full access to all Hexlet courses, projects and lifetime access to the theory of lessons learned. You can cancel your subscription at any time.

Get access
130
courses
1000
exercises
2000+
hours of theory
3200
tests

Sign up

Programming courses for beginners and experienced developers. Start training for free

  • 130 courses, 2000+ hours of theory
  • 1000 practical tasks in a browser
  • 360 000 students
By sending this form, you agree to our Personal Policy and Service Conditions

Our graduates work in companies:

<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.bookmate">Bookmate</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.healthsamurai">Healthsamurai</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.dualboot">Dualboot</span>
<span class="translation_missing" title="translation missing: en.web.courses.lessons.registration.abbyy">Abbyy</span>
Suggested learning programs
profession
Layout with the latest CSS standards
5 months
from scratch
under development
Start at any time

Use Hexlet to the fullest extent!

  • Ask questions about the lesson
  • Test your knowledge in quizzes
  • Practice in your browser
  • Track your progress

Sign up or sign in

By sending this form, you agree to our Personal Policy and Service Conditions
Toto Image

Ask questions if you want to discuss a theory or an exercise. Hexlet Support Team and experienced community members can help find answers and solve a problem.