HTML and CSS Reference
Figure 9-1. Creating the Chapter 9 project
In the next dialog box, select the basic template and make sure the Razor view
engine is selected. Click the oK button and the project will be created (this may take
a few seconds).
Right-click the Controller folder in the Solution Explorer and select the
Add ➤ Controller links. Enter the name HomeController and select the Empty
MVC Controller template. Click the Add button to create the controller.
Right-click the View folder and select the Add ➤ New Folder links. Enter the name
Right-click the new Home folder and select the Add ➤ View links. In the Add View
dialog box, enter the name Index , make sure the Razor view engine is selected,
unselect all the check boxes, and click the Add button.
Adding Some Simple Shapes
To demonstrate how an svg element works you'll add some simple shapes like circles, rectangles, and lines. Most
images can be expressed as a collection of geometrical shapes as I will demonstrate here.
The default implementation of the Index.cshtml file contains an empty div in the body. Change this to
an svg element. Notice that as you change the opening tag, the ending tag is automatically changed. Add the
attributes shown in bold to the svg element:
<svg xmlns:svg=" http://www.w3.org/2000/svg " version="1.2"
width="100px" height="230px" >