diff --git a/dev/js/spec/matchSpec.js b/dev/js/spec/matchSpec.js
index 8df6e86..4553d97 100644
--- a/dev/js/spec/matchSpec.js
+++ b/dev/js/spec/matchSpec.js
@@ -94,6 +94,7 @@
       "    </span>" +
       "  </span>" +
       "</span>" +
+      "<mark>" + 
       "<span title=\"cnx/l:deutlich\">" +
       "  <span title=\"cnx/p:A\">" +
       "    <span title=\"cnx/syn:@PREMOD\">" +
@@ -107,6 +108,7 @@
       "    </span>" +
       "  </span>" +
       "</span>" +
+      "</mark>" +
       "<span title=\"cnx/l:fähig\">" +
       "  <span title=\"cnx/l:leistung\">" +
       "    <span title=\"cnx/p:A\">" +
@@ -485,8 +487,11 @@
       expect(tr.children[0].firstChild.nodeValue).toBe('Foundry');
       expect(tr.children[1].firstChild.nodeValue).toBe('Layer');
       expect(tr.children[2].firstChild.nodeValue).toBe('meist');
+      expect(tr.children[2].classList.contains('mark')).toBeFalsy();
       expect(tr.children[3].firstChild.nodeValue).toBe('deutlich');
+      expect(tr.children[3].classList.contains('mark')).toBeTruthy();
       expect(tr.children[4].firstChild.nodeValue).toBe('leistungsfähiger');
+      expect(tr.children[4].classList.contains('mark')).toBeFalsy();
 
       // first row
       tr = e.children[1].children[0];
diff --git a/dev/js/src/match/table.js b/dev/js/src/match/table.js
index 969de77..1544637 100644
--- a/dev/js/src/match/table.js
+++ b/dev/js/src/match/table.js
@@ -33,12 +33,14 @@
       
       this._pos = 0;
       this._token = [];
+      this._mark = [];
+      this._markE = undefined;
       this._info = [];
       this._foundry = {};
       this._layer = {};
     
       // Parse the snippet
-      this._parse(html.childNodes);      
+      this._parse(html.childNodes, false);      
 
       html.innerHTML = '';
       return this;
@@ -58,6 +60,19 @@
       return this._pos;
     },
 
+
+    /**
+     * Move the viewport to the match
+     */
+    toMark : function () {
+      if (this._markE === undefined)
+        return;
+      this._markE.scrollIntoView({
+        inline: "start",
+        block: "nearest"
+      });
+    },
+    
     /**
      * Get the token in the snippet
      * At a given position.
@@ -85,7 +100,7 @@
 
 
     // Parse the snippet
-    _parse : function (children) {
+    _parse : function (children, mark) {
 
       // Get all children
       for (var i in children) {
@@ -101,7 +116,13 @@
 
         // Element with title
         if (c.nodeType === 1) {
-          if (c.getAttribute("title") &&
+          var newMark = mark;
+
+          if (c.tagName === 'MARK') {
+            newMark = true;
+          }
+
+          else if (c.getAttribute("title") &&
               _TermRE.exec(c.getAttribute("title"))) {
 
             // Fill position with info
@@ -141,14 +162,16 @@
 
           // depth search
           if (c.hasChildNodes())
-            this._parse(c.childNodes);
+            this._parse(c.childNodes, newMark);
         }
 
         // Leaf node
         // store string on position and go to next string
         else if (c.nodeType === 3) {
-          if (c.nodeValue.match(/[a-z0-9]/i))
+          if (c.nodeValue.match(/[a-z0-9]/i)) {
+            this._mark[this._pos] = mark ? true : false;
             this._token[this._pos++] = c.nodeValue;
+          };
         };
       };
 
@@ -221,7 +244,13 @@
 
       // Add tokens
       for (var i in this._token) {
-        tr.addCell('th', undefined, this.getToken(i));
+        var c = tr.addCell('th', undefined, this.getToken(i));
+        if (this._mark[i]) {
+          c.classList.add('mark');
+          if (this._markE === undefined) {
+            this._markE = c;
+          };
+        };
       };
       
       var tbody = table.addE('tbody');
@@ -255,6 +284,10 @@
               key,
               value 
             );
+
+            if (this._mark[v]) {
+              cell.classList.add('mark');
+            };
           };
         };
       };
diff --git a/dev/js/src/view/match/tokentable.js b/dev/js/src/view/match/tokentable.js
index f0d2fd2..2ac361d 100644
--- a/dev/js/src/view/match/tokentable.js
+++ b/dev/js/src/view/match/tokentable.js
@@ -27,29 +27,36 @@
       // Append default table
       var matchtable = d.createElement('div');
       matchtable.classList.add('matchtable', 'loading');
+      this._show = matchtable;
+      return matchtable;
+    },
 
-      var that = this;
-
+    /**
+     * Do after embedding
+     */
+    afterEmbed : function () {
       // TODO:
       //   Create try-catch-exception-handling
-      
-      // Create the table asynchronous
-      this.getData(undefined, function (table) {
-
-        // Load data
-        matchtable.classList.remove('loading');
-
-        if (table !== null) {
-          matchtable.appendChild(table.element());
-	      };
-      });
 
       // TODO:
       //   Loading should have a timeout on view-level
       //   matchtable.classList.remove('loading');
-      
-      this._show = matchtable;
-      return matchtable;
+
+      // var that = this;
+      var matchtable = this._show;
+
+      // Create the table asynchronous
+      this.getData(undefined, function (table) {
+
+        if (table !== null) {
+          matchtable.appendChild(table.element());
+          table.toMark();
+	      };
+
+      });
+
+      // Load data
+      matchtable.classList.remove('loading');      
     },
 
 
