HTML Styles
آنچه در این مطلب میخوانید:
HTML Styles یا سبک های html چیست ؟
آموزش html درس هشتم
صفت HTML Styles
تنظیم style برای html می تواند با صفت (style attribute.)انجام شود.
HTML style attribute دنبال می کند syntax را :
<tagname style="property:value;">
property و value همان property و value در css هستند
بعدا می توانید آموزش های css را در سایت بهترین ایده دنبال کنید.
HTML Background Color
background-color رنگ پس زمینه را برای عناصر html تعریف می کند.
مثال زیر رنگ powderblue را برای پس زمینه تنظیم می کند:
مثال :
<body style="background-color:powderblue;">
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body>
HTML Text Color
color رنگ متن را برای عناصر html بیان می کند.
مثال :
<h1 style="color:blue;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>
فونت های html
font-family فونت استفاده شده برای هر عنصر را تعریف می کند.
مثال :
<h1 style="font-family:verdana;">This is a heading</h1>
<p style="font-family:courier;">This is a paragraph.</p>
اندازه متن html
font-size اندازه متن را برای عناصر html بیان می کند.
مثال :
<h1 style="font-size:300%;">This is a heading</h1>
<p style="font-size:160%;">This is a paragraph.</p>
ترازبندی متن در html
text-align ترازبندی افقی متن را برای عناصر html بیان می کند.
<h1 style="text-align:center;">Centered Heading</h1>
<p style="text-align:center;">Centered paragraph.</p>
۱
۲
۳
۴
۵
میانگین امتیازات ۵ از ۵
از مجموع ۱ رای
برچسب ها:
HTML
دیدگاهتان را بنویسید