الاثنين، 18 أغسطس 2014

الفقرات في HTML

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

http://www.w3schools.com

الفقرات في HTML
HTML Paragraphs

تُقَّسم مستندات HTML إلى فقرات.
HTML documents are divided into paragraphs.

- الفقرات في HTML
يتم تعريف الفقرات باستخدام الوسم <p>.
مثال:
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
- HTML Paragraphs
Paragraphs are defined with the <p> tag.
Example
<p>This is a paragraph</p>
<p>This is another paragraph</p>
---------------------------------------------------------


ملاحظة: المتصفحات تضيف تلقائياً سطر فارغ قبل وبعد الفقرة.
Note: Browsers automatically add an empty line before and after a paragraph.
---------------------------------------------------------
- لا تنسى وسم النهاية
معظم المتصفحات ستعرض HTML بشكل صحيح حتى لو تجاهلت وسم النهاية.
مثال
<p>This is a paragraph
<p>this is another paragraph
المثال في الأعلى سيعمل في معظم المتصفحات، لاكن لا تعتمد على هذا. تجاهل وسم النهاية سينتج عنه نتائج غير متوقعة أو أخطاء.
- Don't Forget the End Tag
Most browsers will display HTML correctly even if you forget the end tag:
Example
<p>This is a paragraph
<p>This is another paragraph
The example above will work in most browsers, but don't rely on it. Forgetting the end tag can produce unexpected results or errors.
---------------------------------------------------------
ملاحظة: الإصدارات القادمة من HTML لن تسمح لك بتجاهل وسوم النهاية.
Note: Future version of HTML will not allow you to skip end tags.
---------------------------------------------------------
- خطوط الفواصل في HTML
استخدم الوسم <br> إذا كنت تحتاج لخط فاصل (سطر جديد) من غير البدء بفقرة جديدة.
مثال:
<p>This is<br>a para<br>graph with line breaks</p>
العنصر <br> هو عنصر HTML فارغ. ليس له وسم نهاية.
- HTML Line Breaks
Use the <br> tag if you want a line break (a new line) without starting a new paragraph:
Example
<p>This is<br>a para<br>graph with line breaks</p>
The <br> element is an empty HTML element. It has no end tag.
---------------------------------------------------------
- تلميحات مفيدة – نتائج HTML
لا يمكنك أن تكون متأكد كيف سيتم عرض HTML. شاشات كبيرة وصغيرة، وتحجيم النوافذ سيخلق نتائج مختلفة.
مع HTML، لا يمكنك تغير النتائج بإضافة مسافة فارغة إضافية أو خطوط إضافية في كود HTML.
المتصفحات ستزيل المسافة الفارغة  الإضافية والخطوط الإضافية عند عرض الصفحة. أي عدد من الأسطر ستُحسب على كسطر واحد، و أي عدد من الفراغات ستُحسب كفراغ واحد.
- HTML Output - Useful Tips
You cannot be sure how HTML will be displayed. Large or small screens, and resized windows will create different results.
With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code.
The browser will remove extra spaces and extra lines when the page is displayed. Any number of lines count as one line, and any number of spaces count as one space.
---------------------------------------------------------
- مثال

<!DOCTYPE html>
<html>
<body>
<p>
تواضع تكن كالنجم لاح لناظر على صفحات الماء وهو رفيع
ولا تكن كالدخان يعلو بنفسه على طبقات الجو وهو وضيع
</p>
</body>
</html>

عند استعراض هذا الكود في متصفحك ستلاحظ أن متصفحك تجاهل التخطيط في الكود المصدري لـ HTML.
- Example

<!DOCTYPE html>
<html>
<body>
<p>
    My Bonnie lies over the ocean.
    My Bonnie lies over the sea.
    My Bonnie lies over the ocean.
    Oh, bring back my Bonnie to me.
</p>
</body>
</html>


When you browse This code in your browser will note that your browser ignores the layout in the HTML source code.
---------------------------------------------------------
- العنصر HTML <pre>
العنصر HTML <pre> يحدد كتلة من النص المنسق مسبقاً، مع مسافات واسطر منظمة.
لعرض شيء، مع مسافات واسطر فاصلة صحيحة، يجب لف النص في العنصر <pre>.
- The HTML <pre> Element
The HTML <pre> element defines a block of pre-formatted text, with structured spaces and lines.
To display anything, with right spacing and line-breaks, you must wrap the text in a <pre> element.

Example:

<!DOCTYPE html>
<html>
<body>

<p>The pre tag is needed for displaying poems:</p>

<pre>
   My Bonnie lies over the ocean.

   My Bonnie lies over the sea.

   My Bonnie lies over the ocean.
  
   Oh, bring back my Bonnie to me.
</pre>

</body>

</html>


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

إرسال تعليق