0% found this document useful (0 votes)
0 views5 pages

HTML Part3

The document explains how to use HTML tags for inserting images and creating lists. The <img> tag allows for image insertion with attributes like src, alt, width, height, border, and align. Additionally, it covers the creation of unordered, ordered, and definition lists using <ul>, <ol>, and <dl> tags, respectively, along with their attributes for customization.

Uploaded by

Rahul Das
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views5 pages

HTML Part3

The document explains how to use HTML tags for inserting images and creating lists. The <img> tag allows for image insertion with attributes like src, alt, width, height, border, and align. Additionally, it covers the creation of unordered, ordered, and definition lists using <ul>, <ol>, and <dl> tags, respectively, along with their attributes for customization.

Uploaded by

Rahul Das
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

HTML Images: You can insert any image in your web page by using <img>

tag. Following is the simple syntax to use this tag.

Syntax: <img src = "Image URL" ... attributes-list/>

As we can see from the syntax <img> tag is an empty tag containing only the
attribute-list. The following attributes used with <img> tags are:

 src attribute: This attribute is used to specify the location where the
image we want to display is located.
 alt attribute: The alt attribute is a mandatory attribute which specifies an
alternate text for an image, if the image cannot be displayed.

 Width attribute: This attribute is used to change the width of the image.
The value of this attribute can be in pixels or percentage.
 Height attribute: This attribute is used to change the height of the
image. The value of this attribute can be in pixels or percentage.
 Border attribute: By default, image will have a border around it, you
can specify border thickness in terms of pixels using border attribute. A
thickness of 0 means there is no border around the picture.

<img src="[Link]" border="20" />

 Align attribute: Like other HTML elements img tag can also be aligned
to left, right or center.

HTML Lists: HTML offers web authors three ways for specifying lists of
information. All lists must contain one or more list elements. Lists may contain:

 An Unordered list <ul>: This will list items using plain bullets.
 An Ordered list <ol>: This will use different schemes of numbers to list
your items.
 A Definition list <dl>: This arranges your items in the same way as they
are arranged in a dictionary.

HTML Unordered list: An unordered list is a collection of related items that


have no special order or sequence. This list is created by using HTML <ul> tag.
Each item in the list is marked with a bullet.
Type attribute in unordered list: You can use type attribute for <ul> tag to
specify the type of bullet you like. By default, it is a disc. Following are the
possible options –

<ul type= “circle”>

<ul type= “square”>

<ul type= “disc”> (by default)

HTML Ordered list: If you are required to put your items in a numbered list
instead of bulleted, then HTML ordered list will be used. This list is created by
using <ol> tag. The numbering starts at one and is incremented by one for each
successive ordered list element tagged with <li>.
Type attribute in ordered list: You can use type attribute for <ol> tag to
specify the type of numbering you like. By default, it is a number. Following
are the possible options –

<ol type = "1"> - Default-Case Numerals.

<ol type = "I"> - Upper-Case Numerals.

<ol type = "i"> - Lower-Case Numerals.

<ol type = "A"> - Upper-Case Letters.

<ol type = "a"> - Lower-Case Letters.

Start attribute in ordered list: You can use start attribute for <ol> tag to
specify the starting point of numbering you need. Following are the possible
options –

<ol type = "1" start = "4"> - Numerals starts with 4.

<ol type = "I" start = "4"> - Numerals starts with IV.

<ol type = "i" start = "4"> - Numerals starts with iv.

<ol type = "a" start = "4"> - Letters starts with d.

<ol type = "A" start = "4"> - Letters starts with D.

HTML Definition list: HTML supports a list style which is called definition
lists where entries are listed like in a dictionary or encyclopaedia. The definition
list is the ideal way to present a glossary, list of terms, or other name/value list.

The different tags used with definition list are:

 <dl> − Defines the start of the list


 <dt> − A term
 <dd> − Term definition
 </dl> − Defines the end of the list

You might also like