html - How to prevent heading tags from inheriting hyperlink styles when setting up heading anchors -
apologies if newbie question. part of job convert traditional word documents online web documentation using google sites.
the document migrating typically has contents page, chapters , sections etc.
in html, have contents page provides clickable links various document sections , headings - doing html anchors.
the problem: not wish text being linked to, inherit ensuing hyperlink styles. example:
<div> <h1>contents page:</h1> <p><a href="#heading">section 1: introduction</a><p> </div> <section> <h1><a name="heading">section1: introduction</a></h1> <p>lorem ipsum dolor sit amet consectetur adipiscing elit dignissim lectus eu risus tortor facilisi class, eleifend faucibus morbi pretium bibendum lobortis tellus hendrerit sociis litora etiam aliquet pharetra.</p> </section>
now heading tag appears hyperlink because of attribute, not want. instead want retain default heading style without me having define override style or that.
i've read somewhere 'all:initial' don't know if stuff works html5/css3.
i'm wondering if issue google sites or..?
is there way this? thanks
<h1><a name="heading">section1: introduction</a></h1>
you don’t need use <a name="heading">
create anchor target within page – every element has id can target of such hash-anchor-link well.
so use <h1 id="heading">section1: introduction</h1>
instead, , no link styles applied.
Comments
Post a Comment