1.

HTML Elements: Adding Text Content

Answer»

  • <blockquote>...</blockquote>: The HTML<blockquote> Element (or HTML Block Quotation Element) denotes an extended quotation. Indentation is usually used to represent this. The HTML <cite> command can be used to provide a URL for the quotation's source. The <cite> element can be used to provide a text representation of the source, while the cite attribute can be used to provide a text representation of the source. An example that shows the usage of the <blockquote> element is given below:
<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 organisation, WWF works in 100 countries and is supported by 1.2 million members in the United States and close to 5 million globally.
</blockquote>

  • <div>...</div>: The generic container for flow content is the HTML Content Division element (<div>). Unless it is styled with CSS, it has no effect on the content or layout. An example that shows the usage of the <div> element is given below:
<div>
<p> This is a paragraph inside a div element</p>
</div>

  • <p>...</p>: A paragraph is represented by the HTML <p> element. An example which shows the usage of the <p> element is given below:
<p> This is a paragraph </p>

  • <pre>...</pre>:  The HTML <pre> element denotes preformatted material that should be displayed precisely as it appears in the HTML source. An example which shows the usage of the <pre> element is given below:
<pre>
This message which is contained in a HTML pre tag
will be shown in a fixed size
font. Also,spaces and
line breaks are preserved as it is.
</pre>


  • <dd>...</dd>: In a description list (<dl>), the HTML <dd> element offers a description, definition, or value for the previous term (<dt>).An example which shows the usage of the <dd> element is given below:


  • <dl>...</dl>: A description list is represented by the HTML <dl> element. The element contains a list of term groups (defined by the <dt> element) and descriptions (supplied by the <dd> elements). This element is commonly used to display metadata (a list of key-value pairs) or to construct a glossary.


  • <dt>...</dt>: The HTML <dt> element is used to specify a term in a description or definition list, and it must be used within a <dl> element.

An example which shows the usage of the <dl>, <dd> and <dt> elements is given below:

<dl>
<dt>Tea</dt>
<dd>Brown Hot drink</dd>
<dt> Milk </dt>
<dd>White cold drink</dd>
</dl>


  • <hr>...</hr>: A thematic break between paragraph level elements is represented by the HTML <hr> element: for example, a change of scene in a story or a shift in topic within a section.


  • <ol>...</ol>: An ordered list of items is represented by the HTML <ol> element, which is commonly shown as a numbered list.


  • <ul>...</ul>: An unordered list of elements, often shown as a bulleted list, is represented by the HTML <ul> element.


  • <li>...</li>: The <li> element in HTML is used to represent a list item.

An example which shows the usage of the <ol>, <ul>, <li> elements is given below:

<div>
<p>List of fruits</p>
<ol>
<li>Apple</li>
<li>Orange</li>
<li>Kiwi</li>
</ol>
<p>List of vegetables</p>
<ul>
<li>Carrots</li>
<li>Broccoli</li>
<li>Spinach</li>
</ol>
</div>


  • <figure>...</figure>: The HTML <figure> (Figure With Optional Caption) element denotes self contained content with an optional caption given by the (<figcaption>) element.


  • <figcaption>...</figcaption>: The HTML <figcaption> element, also known as Figure Caption, is a caption or legend that describes the rest of the contents of its parent <figure> element.

An example which shows the usage of the <figure> and <figcaption> elements is given below:

<figure>
<img src="/pictures/lion-1080-720.jpeg"
alt="Lion hunting">
<figcaption>Picture of a lion hunting its prey</figcaption>
</figure>


Discussion

No Comment Found