0

مدرسه HTML

 
saeidfarajpour
saeidfarajpour
کاربر طلایی1
تاریخ عضویت : آذر 1392 
تعداد پست ها : 2734
محل سکونت : اردبیل

قالب بندی متن HTML
پنج شنبه 17 اردیبهشت 1394  12:45 PM

مثالها

 <html>

<body>
 
<b>This text is bold</b>
 
<br>
 
<strong>
This text is strong
</strong>
 
<br>
 
<big>
This text is big
</big>
 
<br>
 
<em>
This text is emphasized
</em>
 
<br>
 
<i>
This text is italic
</i>
 
<br>
 
<small>
This text is small
</small>
 
<br>
 
This text contains
<sub>
subscript
</sub>
 
<br>
 
This text contains
<sup>
superscript
</sup>
 
</body>
</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>
 
 

به کمک برچسب pre، قالب بندی اولیه متن خود را(شامل فاصله ها و سرخط ها)، حفظ کنید.

<html>
<body>
 
<code>Computer code</code>
<br>
<kbd>Keyboard input</kbd>
<br>
<tt>Teletype text</tt>
<br>
<samp>Sample text</samp>
<br>
<var>Computer variable</var>
<br>
 
<p>
<b>Note:</b> These tags are often used to display computer/programming code.
</p>
 
</body>
</html>
 

نوشته های کامپیوتری، حالتهای خاصی دارند که می توان به کمک برچسبها، متن نوشته شده را به آن حالتها نمایش داد. مثال را ببینید.

 

<html>
<body>
 
<address>
Donald Duck<br>
BOX 555<br>
Disneyland<br>
USA
</address>
 
</body>
</html>
 
 

برچسب address، حالت خاص نمایش آدرس را به متن ما می دهد. ببینید.

 

<html>
<body>
 
<abbr title="United Nations">UN</abbr>
<br>
<acronym title="World Wide Web">WWW</acronym>
 
<p>The title attribute is used to show the spelled-out version when holding the mouse pointer over the acronym or abbreviation.</p>
 
<p>This only works for the acronym element in IE 5.</p>
 
<p>This works for both the abbr and acronym element in Netscape 6.2.</p>
 
</body>
</html>
 
 

اگر بخواهیم مخفف و یا مترادف یک کلمه را در متن نشان دهیم چه می کنیم؟ مثال را ببینید.

 

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

</html>


مثال زیر نشان می دهد که چگونه می توان متن نوشته شده را سروته نشان داد.

 

<html>
<body>
 
Here comes a long quotation:
<blockquote>
This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation. This is a long quotation.
</blockquote>
 
Here comes a short quotation:
<q>
This is a short quotation
</q>
 
<p>
With the block quote element, the browser inserts line breaks and margins, but the q element does not render as anything special.
</p>
 
</body>
</html>
 
 

نقل قول در متن، با توجه به اینکه کوتاه یا بلند باشد، به صورت های مختلف نشان داده می شود. این مثال را ببینید.

 

<html>
<body>
 
<p>
a dozen is 
<del>twenty</del> 
<ins>twelve</ins> 
pieces
</p>
 
<p>
Most browsers will overstrike deleted text and underline inserted text.
</p>
 
<p>
Some older browsers will display deleted or inserted text as plain text.
</p>
 
</body>

</html>

 


برای نمایش کلمات حذف و یا اضافه شده به متن اصلی، مثال را ببینید.

تشکرات از این پست
دسترسی سریع به انجمن ها