Style fontStyle attribute

Definition and Usage

fontStyle Attribute to set or return the font style as normal, italic, or oblique.

See also:

CSS Tutorial:CSS ফন্ট

CSS Reference Manual:font-style attribute

HTML DOM Reference Manual:font attribute

Example

Example 1

Set <p> element's font to "italic" (italic):

document.getElementById("myP").style.fontStyle = "italic";

Try it yourself

Example 2

Demonstration of possible values:

var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myP").style.fontStyle = listValue;

Try it yourself

Example 3

return <p> element's font style:

alert(document.getElementById("myP").style.fontStyle);

Try it yourself

Syntax

return fontStyle attribute:

object.style.fontStyle

set fontStyle attribute:

object.style.fontStyle = "normal|italic|oblique|initial|inherit"

অ্যাট্রিবিউট মান

মান বর্ণনা
normal ফন্ট সাধারণ। ডিফল্ট。
italic ফন্ট তীক্ষ্ণভাবে হয়েছে。
oblique ফন্ট তীক্ষ্ণতা。
initial এই অ্যাট্রিবিউটটিকে তার ডিফল্ট মানে নিন। দেখুন initial
inherit এই অ্যাট্রিবিউটটি পিতৃ এলিমেন্ট থেকে উত্তরণ করুন। দেখুন inherit

টেকনিক্যাল বিবরণ

ডিফল্ট মান: normal
ফলাফল: শব্দ, যা এলিমেন্টের লিখিত টেক্সটের ফন্ট স্টাইল নির্দেশ করে。
CSS সংস্করণ: CSS1

ব্রাউজার সমর্থন

চ্রোম এজ ফায়ারফক্স স্যাফারি ওপেরা
চ্রোম এজ ফায়ারফক্স স্যাফারি ওপেরা
সমর্থন সমর্থন সমর্থন সমর্থন সমর্থন