Time for action – setting up the HTML file
Perform the following steps to get the HTML file set up for our FAQ page:
- We'll get started with our sample HTML file and associated files and folders, like we set up in Chapter 1, Designer, Meet jQuery. In this case, our HTML page will contain a definition list with the questions inside the
<dt>
tags and the answers wrapped in the<dd>
tags. By default, most browsers will indent the<dd>
tags, which means the questions hang into the left margin, making them easy to scan. Inside the<body>
tag of your HTML document, add a heading and a definition list as shown in the following code:<h1>Frequently Asked Questions</h1> <dl> <dt>What is jQuery?</dt> <dd> <p>jQuery is an awesome JavaScript library</p> </dd> <dt>Why should I use jQuery?</dt> <dd> <p>Because it's awesome and it makes writing JavaScript faster and...