Attribute rules

Go back to the list rules

Description

This rule will teach you what are the perfect way to write an attribute in html?
There are some rules which can guide you. It helps you a lot when you write your code in html. It based on attribut, so It is reasonable to focus on how to write perfect attribute in html. Attribute value pairs that what this page focus on.

Some rules

Rules in general:

This is an examples

Do not do this!

          <nav>
            <ul>
              <li>
                <img src="BELLOW CASE.JPG">
              </li>
              <li>
                <img src="CANDLE.jpg">
              </li>
            </ul>
          </nav>
        

Instead do this

          <nav>
            <ul>
              <li>
                <img src="bellow-case.jpg">
              </li>
              <li>
                <img src="candle.jpg">
              </li>
            </ul>
          </nav>
        

Do not do this!

          <nav>
            <ul>
              <li>
                <a href="index.html"picture"">Picture</a>
              </li>
              <li>
                <a href=" ">..</a>
              </li>
            </ul>
          </nav>
        

Instead do this

          <nav>
            <ul>
              <li>
                <a href="index.html">Index</a>
              </li>
              <li>
                <a href="page.html">Page</a>
              </li>
            </ul>
          </nav>