在HTML中;为什么<a> tag start inside a paragraph, but end outside of it?

时间:2017-12-24 19:40:05

标签: html

I was going through some alison.com materials on web development and one of their questions was:

True or False - The following code is formatted correctly.

<p><br>
<a href="">Click here<br>
</p><br>
</a>

The right answer is True.

But why the < a > tags' ending-tag < /a > is outside of the paragraph < p > tag?

1 个答案:

答案 0 :(得分:0)

&#13;
&#13;
<br>
<p><a href="">Click here<br></a></p>
<br>
&#13;
&#13;
&#13;

这样的事情是正确的方法