Q2) Define The Following:: A) List-Style-Position Property
Q2) Define The Following:: A) List-Style-Position Property
a) List-style-position property
The list-style-position CSS property sets the position of the list marker (bullet or number)
in the list items. It can have two values:
inside: The marker is placed inside the list item, and the text wraps around it.
outside: The marker is placed outside the list item, and the text does not wrap around it.
Example:
Example:
c) a
property
The a:hover CSS pseudo-class applies styles to a hyperlink when the user hovers over it with
their mouse pointer. This is commonly used to change the appearance of links to provide visual
feedback to users that the link is interactable.
Example:
CSS Example:
a {
color: blue;
}
a:hover {
color: red;
}
d) Hyperlink
A hyperlink, or simply a link, is an HTML element that allows users to navigate from one page
to another, either within the same website or to a different website. Hyperlinks are created using
the <a> (anchor) tag, and the href (hypertext reference) attribute specifies the URL of the page
the link goes to. When a user clicks on the hyperlink, they are taken to the specified URL.
Example:
In this example, clicking the text "Visit Example.com" will take the user to
https://www.example.com.
<a name="section1"></a>
<p>This is Section 1.</p>
<a href="#section1">Go to Section 1</a>
<a id="section1"></a>
<p>This is Section 1.</p>
<a href="#section1">Go to Section 1</a>
In both examples, clicking the "Go to Section 1" link will jump to the section marked by the
anchor.
1. border:
o Defines the width of the border around the table and its cells.
o Example: <table border="1"> creates a table with a 1-pixel border.
2. cellpadding:
o Sets the amount of space between the content of a cell and its border.
o Example: <table cellpadding="10"> adds 10 pixels of padding inside each
cell.
3. cellspacing:
o Sets the amount of space between the borders of adjacent cells.
o Example: <table cellspacing="5"> creates 5 pixels of space between each
cell.
4. width:
o Specifies the width of the table.
o Can be set in pixels or as a percentage of the containing element.
o Example: <table width="100%"> makes the table span the entire width of its
container.
html
Copy code
<ol>
<li>First item</li>
<li>Second item</li>
</ol>
html
Copy code
<ul>
<li>First item</li>
<li>Second item</li>
</ul>
The src (source) attribute specifies the URL of the resource to be embedded or included in the
document. It is used in various HTML tags, such as:
Example:
Frames can be inserted using the <frameset> and <frame> tags. A <frameset> tag is used to
define the layout of the frames, and the <frame> tag specifies the content of each frame. For
example:
<frameset cols="25%,75%">
<frame src="frame_a.html">
<frame src="frame_b.html">
</frameset>
This example creates a two-column frameset, where the first frame takes 25% of the width and
the second frame takes 75%. Note that frames are deprecated in HTML5, and it is recommended
to use <iframe> for embedding documents.
The <img> tag is used to embed an image in an HTML document. It is an empty tag that contains
attributes to specify the source of the image, alternative text, dimensions, and other properties.
The src attribute specifies the path to the image file, and the alt attribute provides alternative
text if the image cannot be displayed. For example:
Additional attributes like width and height can be used to specify the dimensions of the image:
Cellpadding:
o Adds space between the content of a cell and its border.
o Increases the size of the cell by adding padding inside the cell.
Cellspacing:
o Adds space between the borders of adjacent cells.
o Creates gaps between cells, affecting the overall table layout.
Rowspan:
o Merges cells vertically in a table.
o Attribute of the <td> or <th> tag, specifying the number of rows a cell should
span.
o Example: <td rowspan="2">
Colspan:
o Merges cells horizontally in a table.
o Attribute of the <td> or <th> tag, specifying the number of columns a cell should
span.
o Example: <td colspan="3">