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, the fact that templates aren't separated into components, the visual issue in terms determining to what degree one section or another is nested, etc. To solve these problems, HTML preprocessors, interpreters that translate markup from their own 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.

All of this will allow you to write maintainable code that will automatically translate into plain HTML.

Practice

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

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


Hexlet Experts

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
Layout Designer icon
Profession
Under development beginner
Layout with the latest CSS standards
start anytime 5 months

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.