Use a module such as HTML::TokeParser::Simple to parse your HTML input and split it into sensible chunks, assuming you have start and end points on which to split the file. Populate each resultant HTML file perhaps using something like HTML::Template to make this easier for you.

Update: Reworded last sentence.

Update: I notice you've posted the HTML page in question, ignoring the sites post formatting guidelines and you've not marked your post as having been updated. See How do I post a question effectively? for details. Perhaps you should make "split a html file into given number of parts,how to do it? each part must be end with html tag and output store in separate file." one of your interview questions ;) This isn't rent a coder or a code writing service. Read the advice I've given, write some code and try it. If you have problems come back and show us your attempt.

Update: I see you made similar 'effort' when posting how to split html file?


In reply to Re: how to split a html file? by marto
in thread how to split a html file? by dhaval0203

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.