special characters - Getting away with » in my HTML -


at new company have practice of using » in html so:

<p>» <a href="/individuals/why-washington-national">learn more</a></p> 

when first came across raised eyebrow checked site in number of different browsers , didn't come across problems. @ meeting internal project our group started talking impact character having on being able submit content updates via third-party cms.

to clear not using &raquo;... code looks above.

my preference wrap &raquo; in span , use css style when or needed. thoughts?

the accessibility issue of » being quotation mark aside, fine html include directly in source. in case, though, purpose seems decorative, may want consider using css pseudo-elements , generated content apply needed , keep out of html together.

html

<p class="raquo">  <a href="/individuals/why-washington-national">learn more</a> </p> 

css

.raquo:before {     content: '»'; } 

you can use css :before element style heart's content without having introduce needless <div>'s and, in situations, limit accessibility impact of using character.

by way, isn't semantic put <div> inside <p>.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -