` element identified by the CSS selector `letterpile`—with
+a call to `letterpile.children.add()`.
Each button element in the letter pile
-has a mouse click handler called moveLetter().
-If the button is in the letterpile,
+has a mouse click handler called `moveLetter()`.
+If the button is in the letter pile,
the mouse click handler moves the button to the end of the word.
If the button is in the word,
the mouse click handler moves the button back to the letter pile.
@@ -441,7 +518,7 @@ The `+=` operator is a compound assignment operator,
which combines an operation (`+`) with an assignment.
The `scrabbleValues` variable is a
-
Map—a
+[`Map`]({{site.dart_api}}/{{site.data.pkg-vers.SDK.channel}}/dart-core/Map-class.html){:target="_blank" rel="noopener"}—a
data structure that contains key/value pairs.
Use the square bracket syntax to retrieve a value by its key
and the `length` property to get the number of pairs it contains.
diff --git a/src/_tutorials/web/low-level-html/connect-dart-html.md b/src/_tutorials/web/low-level-html/connect-dart-html.md
index 1b4c836833..899e246cff 100644
--- a/src/_tutorials/web/low-level-html/connect-dart-html.md
+++ b/src/_tutorials/web/low-level-html/connect-dart-html.md
@@ -1,13 +1,11 @@
---
title: Connect Dart and HTML
-description: Shows basic scaffolding of a Dart web app.
+description: Learn how to set up basic scaffolding of a Dart web app.
nextpage:
url: /tutorials/web/low-level-html/add-elements
title: Add elements to the DOM
---
-{% include not-null-safe.md %}
-
This tutorial is the first of a series on
basic, low-level web programming with the dart:html library.
If you use a web framework,
@@ -23,7 +21,7 @@ but you might not need to use the dart:html library at all.
* Compile a web app's Dart code to JavaScript to run the app in any modern browser.
* An HTML file hosts your Dart code in a browser page.
* The DOM models a browser page in a tree/node structure.
-* Use querySelector() with an ID to get an element from the DOM.
+* Use `querySelector()` with an ID to get an element from the DOM.
* CSS selectors are patterns used to select matching elements in the DOM.
* Use CSS rules to style elements.
@@ -31,7 +29,7 @@ but you might not need to use the dart:html library at all.
To write a low-level web app with Dart,
you need to understand
-several topics—the DOM tree, nodes, elements,
+several topics—the DOM tree, nodes, elements,
HTML, and the Dart language and libraries.
The interdependencies are circular,
@@ -54,17 +52,17 @@ for more interesting and useful web apps.
## About the Dart, HTML, and CSS triumvirate {#source-files}
If you've used
-
DartPad,
-you've already seen the DART, HTML, and CSS tabs
+[DartPad]({{site.dartpad}}){:target="_blank" rel="noopener"},
+you may have already seen the Dart, HTML, and CSS tabs
that let you write the code for a web app.
Each of these three languages
is responsible for a different aspect of the web app.
-| Language | Purpose |
-|---|---|
-| Dart | Implements the interactivity and dynamic behavior of the web app |
-| HTML | Describes the content of the web app's page (the elements in the document and the structure) |
-| CSS | Governs the appearance of page elements |
+| Language | Purpose |
+|----------|----------------------------------------------------------------------------------------------|
+| Dart | Implements the interactivity and dynamic behavior of the web app |
+| HTML | Describes the content of the web app's page (the elements in the document and the structure) |
+| CSS | Governs the appearance of page elements |
{: .table}
A Dart program can
@@ -104,12 +102,11 @@ the resulting web browser page in Chrome.
HTML uses tags to describe the document.
For example, the simple HTML code above
-uses the \
tag for the page title,
-\ for a level-one header,
-and \
for a paragraph.
+uses the `
` tag for the page title,
+`` for a level-one header,
+and `
` for a paragraph.
Some tags in the HTML code,
-such as
-\
and \,
+such as `` and ``,
are not visible on the web page,
but do contribute to the structure of the document.
@@ -123,9 +120,9 @@ text nodes, and attribute nodes.
Here is the DOM tree for the simple HTML file above.
+ alt="A Dart dynamically changing the DOM">
-Notice that some tags, such as the \
paragraph tag,
+Notice that some tags, such as the `
` paragraph tag,
are represented by multiple nodes.
The paragraph itself is an element node.
The text within the paragraph is a text node
@@ -153,7 +150,7 @@ or even insert an entire subtree of nodes.
## Create a new Dart app {#create-dart-app}
-1. Go to DartPad.
+1. Go to the [DartPad]({{site.dartpad}}){:target="_blank" rel="noopener"}.
2. Click the **New Pad** button to undo any changes you might have made
the last time you visited DartPad.
3. Click **Dart**.
@@ -162,27 +159,27 @@ or even insert an entire subtree of nodes.
{{site.alert.note}}
These instructions feature DartPad,
- which hides some of the HTML boilerplate code.
+ which hides some HTML boilerplate code.
If you want to use any other editor,
then we recommend starting with a small Dart web app sample
- and modifying the non-script tags inside the \
section.
+ and modifying the non-script tags inside the `` section.
[HTML and Dart connections](#connections) shows the full HTML code.
{{site.alert.end}}
## Edit the HTML source code {#create-html}
1. Click **HTML**, at the upper left of DartPad.
- The view switches from Dart code to the (non-existent) HTML code.
+ The view switches from Dart code to the (currently non-existent) HTML code.
2. Add the following HTML code:
- {% prettify html tag=pre+code %}
+ ```html
RipVanWinkle paragraph.
- {% endprettify %}
+ ```
-3. Click **HTML OUTPUT** to see how a browser would render your HTML.
+3. Expand the output pane to see how a browser would render your HTML.
## About the HTML source code {#about-html-code}
@@ -191,41 +188,39 @@ This HTML code is similar to the HTML code in the
various diagrams earlier in this tutorial,
but it's even simpler.
-In DartPad you need only the tags you really care about—in
-this case, \
.
-You don't need surrounding tags such as
-\ and \
.
+In DartPad you need only the tags you really care about—in this case: `
`.
+You don't need surrounding tags such as `` and `
`.
Because DartPad knows where your Dart code is,
-you don't need a \