04.07.2013 Views

Start Here! Learn JavaScript - Cdn.oreilly.com

Start Here! Learn JavaScript - Cdn.oreilly.com

Start Here! Learn JavaScript - Cdn.oreilly.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4. Click HTML Page, change the name to index.html, and then click Add.<br />

Depending on the version of Visual Studio you’re using, you might see a basic HTML page that<br />

uses an XHTML document type similar to that in Figure 1-7. Some versions of Visual Studio use<br />

an HTML5 doctype as you’ve seen throughout the chapter, so your screen might look different<br />

than this.<br />

FIGURE 1-7 A beginning page with Visual Studio 11.<br />

5. If your version of Visual Studio has the XHTML doctype as shown, the first thing you need<br />

to do is switch the DOCTYPE for the page. If your doctype is already the HTML5 doctype<br />

(), there’s nothing to change and you can skip this step. If you need to<br />

change it, highlight the entire DOCTYPE declaration in Visual Studio and delete it. Replace<br />

that long (and ugly) DTD with the following:<br />

<br />

6. Within the declaration, remove the xmlns namespace attribute. This applies only if it’s<br />

present. Some versions of Visual Studio don’t have this attribute present. If it’s not there in<br />

yours, you don’t need to change it.<br />

Regardless of the version of Visual Studio you have, you need to change the tag so<br />

that it contains the words <strong>Start</strong> <strong>Here</strong>. With those three changes (which you can find in the<br />

<strong>com</strong>panion content as index.html), the page should look like this:<br />

<br />

<br />

<br />

<strong>Start</strong> <strong>Here</strong><br />

<br />

<br />

14 <strong>Start</strong> here! <strong>Learn</strong> <strong>JavaScript</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!