H
H
Hazrat Hajikerimov2014-11-06 02:39:22
Google Chrome
Hazrat Hajikerimov, 2014-11-06 02:39:22

What's wrong with the tag?

Created the following block:

<a class="href" href="#">
     <div class="logo"></div>
     <div class="block">
             <h2>Febox - создание сайтов</h2>
              <p>Веб-студия дизайна</p>
      </div>
      <a class="link" href="#">
           <i class="fa fa-chevron-right"></i>
      </a>
</a>

Everything seems to be clear, there is another a.link block in the a.href block, but when displayed in the browser, I see the following:
download?id=SWh7dsBj0i2rYYTLKl1Ink0izMCc
Can't a tags be nested?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexander, 2014-11-06
@hazratgs

Nothing is clear. Some tags cannot be nested. For example P. Including A. Simply nesting tags does not make sense and when a new tag is opened, the parent tag will be automatically closed.

R
Rsa97, 2014-11-06
@Rsa97

From the official standard:

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 (eg buttons or other links).

A
Alexander Aksentiev, 2014-11-06
@Sanasol

No ...
How do you think it should work? Follow two links at the same time?
Why the second link for the icon at all?

S
Sharov Dmitry, 2014-11-06
@vlom88

In general, you should revise your markup and bring it to a rational form
Well, if you really want to pervert, then do this

<a class="href" href="#">
     <div class="logo"></div>
     <div class="block">
             <h2>Febox - создание сайтов</h2>
              <p>Веб-студия дизайна</p>
      </div>
      <div class="link" onclik="location.href='/path/to/res'">
           <i class="fa fa-chevron-right"></i>
      </div>
</a>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question