How can I navigate within view?

I want to display a static html file within my view. For this I use a Label component like under:

Label = new Label(); label.setContentMode(ContentMode.HTML); addComponent(label); label.setValue("<!DOCTYPE html>\n" + "<html>\n" + "<body>\n" + "\n" + "<p>\n" + "<a href=\"#C4\">See also Chapter 4</a>\n" + "</p>\n" + "\n" + "<p>\n" + "<h2>Chapter 1</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 2</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 3</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2><a name=\"C4\">Chapter 4</a></h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 5</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 6</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 7</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 8</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 9</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 10</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 11</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 12</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 13</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 14</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 15</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 16</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "<h2>Chapter 17</h2>\n" + "<p>This chapter explains ba bla bla</p>\n" + "\n" + "</body>\n" + "</html>"); When I want to simulate this example (w3schools.com/tags/tryit.asp?filename=tryhtml_a_name), I face with a strange. The browser try to navigate me to “C4” view, but I want to navigate within the page. How can I solved this?

You need to change the links in the HTML from “C4” to “#C4”. Then you need an UriFragmentChangedListener on your Page, which will let you know when the fragment changed. Note that if you are already using fragments (with e.g. the Navigator), this will interfere with that.