You have some problems with your current code:
Elements within the link tag:
The element <button/>
cannot be inside the element <a/>
what can be read in the documentation in: HTML5 Spec Document from W3C:
Content model: Transparent, but there must be no Interactive content Descendant.
The a element may be Wrapped Around entire paragraphs, lists, Tables, and so Forth, Even entire sections, so long as there is no Interactive content Within (e.g. Buttons or other links).
That translated:
Content template: transparent, but there should be no interactive content descending.
The element can be wrapped around whole paragraphs, lists, tables, and so on, even whole sections, as long as there is no interactive content within it (e.g., buttons or other links).
Closing of tags
The elements <p/>
are not closed, which is why your code does not generate HTML as intended.
Solution
You can place both links inside a paragraph and format with CSS to get the desired look:
a{
display:inline-block;
text-decoration:none;
padding:6px 4px;
border:1px solid #ccc;
background-color:#f2f2f2;
color:#333;
font:15px arial, sans-serif;
}
a:hover{
border-color:#aaa;
}
<p>
<a href="guardadorrebanhos.html">
voltar
</a>
<a href="guardadorrebanhos.html">
análise
</a>
</p>
Okay I already realized what had wrong. Had on the first button start the paragraph and end on the second.
– Catarina Silvestre
Remove the tag
<p>
because it breaks into paragraphs, or uses css to format the paragraph width, but it’s not ideal. You can change theinput
forbutton
.– Papa Charlie
And where PHP enters the story?
– gmsantos
@Catarina Silvestre, you already solved the problem?
– Lucas
@Lucas yes I have. Thanks anyway.
– Catarina Silvestre