문제

Example

<span style="BACKGROUND-COLOR: #ffd700">Background color</span>

How screen reader handle inline css ? is there any other cons of inline CSS except css management?

Inline styles are valid also . i tested with W3C Validator and with XHTML 1.0 Strict doctype?

<p><span style="MARGIN-RIGHT: 0px">Left indent</span></p>
도움이 되었습니까?

해결책

How screen reader handle inline css ?

Same as any other CSS.

is there any other cons of inline CSS except css management?

Just bandwidth related costs.

다른 팁

Inline styles are hard to manage and to override. And if you set colors and borders they may override your print stylesheet. I have seen yellow links in print previews …  clearly not the author’s intention but a very bad user experience.

Screenreaders honor only the display property, the don’t speak elements with display:none. It doesn’t matter where you declare it.

inline css isnt bad for screen readers. just its not so useful/

but if you want give style in additional ways/ use this if you can;

div.blabla p span{margin-right: 0px;}

or give that style with jquery/

$("div#blabla").css("display","none");  
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top