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.

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
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


* indicates required
Subscribe to plus2net

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

    Most Popular JQuery Scripts


    Two dependant list boxes


    Calendar with Date Selection


    Data change by Slider


    Show & Hide element

    JQuery Video Tutorials

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2022 All rights reserved worldwide Privacy Policy Disclaimer