[Solved] HTML please Hilp


I tried to understand your question but it is hard to visualize exactly what you want. So I’ll just clean and update your code (i.e. bring it into the 21st Century).

  1. Please don’t use the <font> tag or the align attribute anymore. It’s 2016.
  2. If this is a heading, use <h1>, not <p>.
  3. Tags work like parentheses in math. Close the inner before the outer:

    <strong><em>this is correct.</em></strong>
    <strong><em>this is incorrect.</strong></em>
  4. Learn CSS. It saves you from repeating a lot of code and it’s just the right thing to do.

<style>
  /* this is CSS */
  .page-heading {
    font-size: 80px;
  }
  .letter1, .letter4 { color: #009900; }
  .letter2, .letter5 { color: #ffff00; }
  .letter3 { color: #ff0000; }
</style>
<h1 class="page-heading">
  <span class="letter1 sans">R</span>
  <span class="letter2 sans">A</span>
  <span class="letter3 sans">S</span>
  <span class="letter4 sans">T</span>
  <span class="letter5 sans">A</span>
</h1>

If class .sans is what I think it is (font-family: sans-serif), and its properties are all inherited (as indeed font-family is) then you don’t need to apply it to each span; you can apply it to the entire heading. Each span will inherit it from the heading. Again, this only works if all the properties in .sans are inherited.

<h1 class="page-heading sans">
  <span class="letter1">R</span>
  <span class="letter2">A</span>
  <span class="letter3">S</span>
  <span class="letter4">T</span>
  <span class="letter5">A</span>
</h1>

Alternate solution: Use all descriptive CSS classes. Recommended only for very advanced CSS authors.

(This method reduces CSS size, however design changes must be reflected in the HTML, not the CSS. When first learning CSS you’re better off with the method above.)

<style>
  .fz-80    { font-size: 80px; }
  .c-green  { color: #009900; }
  .c-yellow { color: #ffff00; }
  .c-red    { color: #ff0000; }
</style>
<h1 class="sans fz-80">
  <span class="c-green">R</span>
  <span class="c-yellow">A</span>
  <span class="c-red">S</span>
  <span class="c-green">T</span>
  <span class="c-yellow">A</span>
</h1>

solved HTML please Hilp