Solution for Exercises on JQuery

  1. Assign font size and font family and background colour to a <p> tag by using style property.
  2. Use the above <p> tag in three places in a page and set this common style property to above tag.
  3. Use the above code to style the tags in multiple pages by using common file.
Solution:

This is line 1

This is line 2

This is line 3

Code is here
<p id=p1 class=my_p>This is line 1</p>
<p id=p2 class=my_p>This is line 2</p>
<p id=p3 class=my_p>This is line 3</p>
Keep the style tag inside head tag of the page
<style>
.my_p{
	font-size:20px;
	background-color:yellow;
}
</style>
To use the same style in multiple pages, use one external style page custom.css and place the link inside the head tag of all the pages.
<link rel='stylesheet' href='custom.css' type='text/css'>
Read more on CSS


plus2net.com



Post your comments , suggestion , error , requirements etc here .







Most Popular JQuery Scripts

1

Two dependant list boxes

2

Calendar with Date Selection

3

Data change by Slider

4

Show & Hide element
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer