Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 580243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:27:07+00:00 2026-05-13T14:27:07+00:00

I like the h1 element because it specifies the contents are header style contents,

  • 0

I like the h1 element because it specifies the contents are header style contents, but you’re not supposed to put things like images or divs inside an h1, so is there an alternative to an h1 that I can put other markup in?

My current html looks like this:

<div class="section">
    <h1>
        <div style="float:left">header text</div>
        <div style="float:right">text</div>
        <div style="clear:both;float:none;"></div>
    </h1>
    <div>body contents</div>
</div>

I like the h1 because I can add a css style to any h1 with a div.section class, but I’m not suppoed to put divs in it…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:27:08+00:00Added an answer on May 13, 2026 at 2:27 pm

    You should use a semantic image replacement method: Which makes for the most elaborate design (images, colors ect.. the graphic is your oyster) as well as being completely semantic and accessible.

    Otherwise as mentioned above, you can add any element that is an inline element: A, SPAN, ect… inside of your H1… but I would shy away from this if you are interested in semantics and being SEO friendly.:

    <style>
      h1{
        background:    url('../path/to/image/image_to_replace_header.jpg') no-repeat top left;  // Sets the BG that will replace your header
        text-indent:   -9999px;  //  Moves the test off screen
        overflow:      hidden;   //  Hides the staggered text for good
        width:         300px;    //  Sets width of block(header)
        height:        100px;    //  Sets height of block(header)
      }  
    </style>
    
    <h1>My Awesome Site</h1>
    

    Now your text is still technically there, but you have a pretty photo in its place. Sighted, non sighted, and robot friendly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can get the element like this $(#txtEmail) but I'm not sure how to
I have an element like this: <div id=foo_<?php echo $id;?> class=hidden></div> I'm trying if
I have an element like this: <span class=tool_tip title=The full title>The ful&#8230;</span> This seems
I have a html element (like select box input field) in a table. Now
My form has a custom element like below, created using custom ajax: <select jwcid=testtest
I want to convert an xml element like this: <asin>​B0013FRNKG​</asin>​ to string in javascript
I have 2 click handlers binded to an element like so: in the file
I can bind a jquery event to this element like: <script type=text/javascript> $('#new_key').ready(function() {
I have a Zend_Form with file element like this: ->addElement('file', 'image', array( 'required' =>
When I bind a function to a checkbox element like: $(#myCheckbox).click( function() { alert($(this).is(:checked));

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.