O'Reilly logo

Practical Business Intelligence by Ahmed Sherif

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up traditional HTML components

In order to understand the power and flexibility of D3, it would make sense to first understand an example of leveraging HTML without it.

Adding a new paragraph the traditional way

Adding a new paragraph to the body of the HTML page is pretty straightforward. All that is necessary is to include two <p> tags with with the appropriate name of the paragraph, as seen in the following script:

<!DOCTYPE html> 
<html> 
<head> 
<script src="d3.js" charset="utf-8"></script>  
  <meta charset="utf-8"> 
  <meta name="viewport" content="width=device-width"> 
  <title>First Example</title> 
</head> 
<body> 
<p>This is our first example</p> 
</body> 
</html>  

Besides adding a new paragraph, we also changed the title of this page to First Example ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required