الاثنين، 8 سبتمبر 2014

تنسيق النص في HTML

المشاركة رقم:58
سلسلة احتراف برمجة صفحات الويب  Web Pages Programming Tutorial
إتش تي إم إل 5  HTML5 
_________________________________
منقول ومترجم للعربية من Moved and Translated to Arabic From

http://www.w3schools.com
تنسيق النص في HTML
HTML Text Formatting

- وسوم التنسيق في HTML
تستخدم HTML وسوم مثل <b> و <i>، لإخراج التنسيق، مثل  النص الغامق أو المائل.
وسوم HTML هذه تدعى وسوم التنسيق.
 ( لمزيد من وسوم التنسيق انظر إلى المرجع الموجود أسفل هذه المشاركة).
- HTML Formatting Tags
HTML uses tags like <b> and <i> for formatting output, like bold or  italic text.
These HTML tags are called formatting tags .
(look at the bottom of this post for a complete reference).
---------------------------------------------------------
- مثال Example
<!DOCTYPE html>
<html>
<body>
<p><b>This text is bold</b></p>
<p><strong>This text is strong</strong></p>
<p><i>This text is italic</i></p>
<p><em>This text is emphasized</em></p>
<p><code>this is computer outputt</code></p>
<p>This is <sub>subscript</sub> and <sup>superscript</sup></p>
</body>
</html>
عند تشغيل كود الـ HTML هذا، في متصفحك ستكون النتيجة كالتالي:
When you run this HTML code, in your browser the result will be like this:




---------------------------------------------------------
- غالباً الوسم <strong> يُقَدم مثل الوسم <b>، والوسم <em> يُقَدم مثل الوسم <i>.
ومع ذلك، هناك اختلاف في معنى هذه الوسوم:
<b> أو <i> يُعرف نص غامق أو مائل فقط.
<strong> أو <em> يعني أنك تريد تقديم النص بطريقة يفهم المستخدم أنه مهم. اليوم، كل المتصفحات الرئيسية تقدم strong على أنه غامق  و em على أنه مائل، إذا أراد أحد المتصفحات في يوم من الأيام أن يجعل النص بارز مع الميزة strong، قد يكون مخطط وليس غامق!
- Often <strong> renders as <b>, and <em> renders as <i>.
However, there is a difference in the meaning of these tags:
<b> or <i> defines bold or italic text only.
<strong> or <em> means that you want the text to be rendered in a way that the user understands as "important". Today, all major browsers render strong as bold and em as italics. However, if a browser one day wants to make a text highlighted with the strong feature, it might be cursive for example and not bold!
---------------------------------------------------------


أمثلة Examples

- نص مُنسق مسبقا
كيفية التحكم في فواصل الأسطر والفراغات مع الوسم <pre>.
- Preformatted text
How to control the line breaks and spaces with the <pre> tag.

<!DOCTYPE html>
<html>
<body>
<pre>
This is
preformatted text.
It preserves     both spaces
and line breaks.
</pre>
<p>The pre tag is good for displaying computer code:</p>
<pre>
for i= 1 to 10
      print i
next i
</pre>
</body>
</html>


---------------------------------------------------------

- وسوم "مخرجات الكمبيوتر"
كيف تختلف "مخرجات الكمبيوتر" الوسوم التي سيتم عرضها.
- "Computer output" tags
How different "computer output" tags will be displayed.

<!DOCTYPE html>
<html>
<body>
<code>Computer code</code>
<br>
<kbd>Keyboard input</kbd>
<br>
<samp>Sample text</samp>
<br>
<var>Computer Variable</var>
<br>
<p><b>Note</b> These tages are often used to display computer/programming code.</p>
</body>
</html>



---------------------------------------------------------

- العناوين
كيفية تعريف معلومات الاتصال للمؤلف/صاحب وثيقة HTML.
- Address
How to define contact information for the author/owner of an HTML document.

<!DOCTYPE html>
<html>
<body>
<address>
Written by W3school.com<br>
<a href="mailto:us@example.org">Email us</a><br>
Address: Box 123, Ramallah<br>
Phone: +12 34 56 78
</address>
</body>
</html>



---------------------------------------------------------

- الاختصارات والمختصرات
كيفية التعامل مع الاختصارات والمختصرات.
- Abbreviations and acronyms
How to handle abbreviations and acronyms.

<!DOCTYPE html>
<html>
<body>
<p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>
<p>Can I get this <abbr title="as soon as possibe">ASAP</abbr>?</p>
<p>The title attribute is used to show the spelled-out version when holding the mouse pointer over
the acronyc or abbreviation.</p>
</body>
</html>


---------------------------------------------------------

- اتجاه النص
كيفية تغيير اتجاه النص.
- Text direction
How to change the text direction.

<!DOCTYPE html>
<html>
<body>
<p>
If your browser supports bi-directional override (bdo),the next line will be written from the
right to left (rtl):
</p>
<bdo dir="rtl">Here is some Arabic text</bdo>
</body>
</html>


---------------------------------------------------------

- الاقتباسات
كيفية التعامل مع الاقتباسات الطويلة والقصيرة
Quotations
How to handle long and short quotations.

<!DOCTYPE html>
<html>
<body>
<h2>The blockquote Element</h2>
<p>The blockquote element specifies a section that is quoted from another source.</p>
<p>Here is a quote from WWF's website:</p>
<blockquote cite="http://www.worldwildlife.org/who/index.html">
For 50 years, WWF has been protecting the future of nature. The world's leading conservation
organization, WWF works in 100 countries and supported by 1.2 million members in the United
States and close to 5 million globally.
</blockquote>
<p><b>Note:</b> Browsers usually indent blockquote elements.</p>

<h2>The q Element</h2>
<p>The q element defines a short quotation.</p>
<p>WWF's gola is to:
<q>Build a future where peoble live in harmony with nature.</q>
we hope they succeed.</p>
<p><b>Note:</b> Browsers insert qoutation marks around the q element.</p>
</body>
</html>


---------------------------------------------------------

- النص المحذوف و المُدرج
كيفية وضع علامة على النص المحذوف المُدرج.
- Deleted and inserted text
How to mark deleted and inserted text.

<!DOCTYPE html>
<html>
<body>
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
<p>Notice that browsers will strikethrough deleted text and underline inserted text.</p>
</body>
</html>


---------------------------------------------------------

- تميز النص
كيفية وضع علامة / تسليط الضوء على النص
- Marked/Highlighted text
How to mark/highlight text.

<!DOCTYPE html>
<html>
<body>
<p>Do not forget to buy <mark>milk</mark> today.</p>
</body>
</html>





ليست هناك تعليقات:

إرسال تعليق