repeat code block
I have a code blocks that repeat themselvs.
By writing code blocks I meen html, javascript and css that repeats in many pages.
for example:

    .filter {
        background-color:black;
    }
    
    $(document).ready(function(){
         $('[name=aaclick]').click(function(){ alert('aa!'); });
    });
    
    <div class="filter">
        aaa<input type="text" />
        <a name="aaclick">click</a>
    </div>

1. Can I combine those 3 parts of single unit together?
2. How can I prevent myself from writing this code again and again in different pages?
repeat code block
===

I have a code blocks that repeat themselvs.
By writing code blocks I meen html, javascript and css that repeats in many pages.
for example:

    .filter {
        background-color:black;
    }
    
    $(document).ready(function(){
         $('[name=aaclick]').click(function(){ alert('aa!'); });
    });
    
    <div class="filter">
        aaa<input type="text" />
        <a name="aaclick">click</a>
    </div>

1. Can I combine those 3 parts of single unit together?
2. How can I prevent myself from writing this code again and again in different pages?