` with the relevant class names
* `createTextNode`: we create a new text node with the message alert string
* `appendChild`: we "connect" the text node to the `
`
* `getElementsByClassName`: we get references to the elements having the `container` class
* `item`: we focus on the second container
But we want it on the top (just after the navigation bar). Just replace the last instruction with this one:
```js
mainContainer.insertBefore(newDiv, mainContainer.firstChild);
```
> There are even more methods like `removeChild` or `replaceChild` ...
---
### Example 1 - up to you!
.breadcrumbs[
JavaScript - DOM API >
Document Object Model (DOM)]
We have a second information in our `content.alertLink`, let's use it.
Add a small **More info ...** link next to the displayed message alert.
---
### Example 2 - alignment buttons
.breadcrumbs[
JavaScript - DOM API >
Document Object Model (DOM)]
We want to enable these three alignment buttons we have in our user interface. Using them must align all `
` in the web page.
As previously, we need to add event listeners:
```js
function enableAlignmentButtons() {
var buttons = document.getElementsByTagName("button");
for (var i = 0; i < buttons.length; i++) {
if (buttons.item(i).childNodes[0].nodeName === "SPAN") {
buttons.item(i).addEventListener("click", alignAllText);
}
}
}
```
* `getElementsByTagName`: we get the references on all the `