To directly address your question, it will be a demo that is already done, hosted on your portfolio (Git Hub pages or preferably your own domain) and then providing a link to your portfolio on your resume at the top where all your contact details are like so:
Website: (portfolio link goes here)
Name the four types of @media properties.
What is the difference between the equality operators
for loop that counts from 1-100 and prints the result to HTML.
Explain the concept of “hoisting”.
There are millions of examples online of front-end questions and so it’s good practice to read up on them because knowledge about these concepts will separate you as someone who understands front-end development from someone who merely knows front-end development.
Note: You might even be given a take-home assignment where they provide you with a list of tasks to complete and submit. These will often check whether you can create a website from a prototype, fetch API’s and the resulting data and use libraries like Bootstrap to accelerate your workflow.
As for how to create sample demos, there’s really only one option for creating sample demos with no work experience and that is to create personal projects. As @simonebogni mentioned, it’s important that these websites are hosted so that employers can test your code in a live environment as they read what is happening under the hood on your Github.
I always recommend creating real-world websites that are either entrepreneurial in design or commercial in design to show to employers as 99% of the time, these will be the websites that you’ll create. For example:
Entrepreneurial - a dating website that connects abandoned pets with potential owners based on select criteria like whether they want a playful or lazy pet, old or young, dog or cat, etc. This is often referred to as a “passion project”.
Commercial - the classic fashion website which has online ordering, navigation, bold hero-image for the front-page, etc. Google any of your favorite clothing brands, find their websites and try to recreate it.
Note: You don’t have to create designs from scratch. Borrow elements from other websites and combine them to create a unique design.