WordPress.org

Support

Support » How-To and Troubleshooting » Proper Heading Tag Format

Proper Heading Tag Format

  • Here is my code:

    h1 {margin:0px; padding:0px; line-height:24px; font-size:20px; font-weight:normal; }
    
    h2 {margin:0px; padding:0px; line-height:22px; font-size:18px; font-weight:normal; }
    
    h3 {margin:0px; padding:0px; line-height:20px; font-size:16px; font-weight:normal; }
    
    h4 {margin:0px; padding:0px; line-height:20px; font-size:16px; font-weight:normal; border-bottom:1px dashed #000; }
    
    h5 {margin:0px; padding:0px; line-height:16px; font-size:12px; font-weight:normal; }
    
    h6 {margin:0px; padding:0px; line-height:14px; font-size:10px; font-weight:normal; }
    
    .widget-footer h4 {margin:0 0 0 -11px; padding:0px; line-height:24px; background:#222; font-size:14px; font-weight:normal; text-align:center; color:#fff; text-shadow:1px 2px 3px #000; -moz-border-radius: 8px; -webkit-border-radius:8px; border-radius:8px 8px 0 0;}

    You will notice the h4 has a bottom border, but the widget-footer h4 does not. When viewing my site, the widget-footer h4 displays the bottom border. I know I can add border none, but i wanted to see if there was a better way to do/organize this code?

    Thanks

    code within footer region:

    <div class="widget-footer">
    		<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer 1') ) : ?>
    		<h4>Links</h4>
    		<ul>
    		 <li><a href="#">Sample</a></li>
    		 <li><a href="#">Sample</a></li>
    	       	<li><a href="#">Sample</a></li>
    		</ul>
    		</div>
    	<?php endif; ?>
    	</div>

Viewing 3 replies - 1 through 3 (of 3 total)
  • I know I can add border none, but i wanted to see if there was a better way to do/organize this code?

    there is no better way.

    http://www.w3schools.com/css/

    Thanks alc!!! i just realized i will remove the border from the standard h4 tag and place the border within the sidebar h4 tag. that will do it!

    In WordPress posts: Is the post TITLE automatically made H1 by default? If so, would my first in-post heading be an H2, or should I make it another H1?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Proper Heading Tag Format’ is closed to new replies.
Skip to toolbar