Skip to content

Instantly share code, notes, and snippets.

@aaizemberg
Created July 22, 2015 15:57
Show Gist options
  • Save aaizemberg/18f490919a30a1ed82b7 to your computer and use it in GitHub Desktop.
Save aaizemberg/18f490919a30a1ed82b7 to your computer and use it in GitHub Desktop.
text & html
<!DOCTYPE html>
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js"></script>
<meta charset="utf-8">
<title>text vs html</title>
</head>
<body>
<p>m&#179;</p>
<script>
d3.select("body").append("p").text("m&#179;");
// ||||
// ||---- text
d3.select("body").append("p").html("m&#179;");
// ||||
// ||---- html
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment