What are some tips and tricks every Front end developer should learn with HTML,CSS, and JavaScript or PHP?

If you want to store some information about some data of an element and you don’t want to store it in a variable then you can create an attribute inside the tag of that element and store that information there.


<input type=’text’ employee_type=’tier1′ id=’employee_name’ val=’Person 1′ />


Person 1

display:inline is sometimes better than setting float

If you are loading same html content over ajax multiple times and if it has some javascript/jQuery methods called using class or id selectors then better change those methods to functions and call them using inline event handlers from elements.

instead of

$(‘#selector’).on(‘click’,function(){//do something});


<script>function clickSelector(){//do something};

Reason being, every time html content you load dynamically in your DOM, javascript will treat every method as separate object and it will stack them one over the other, so the same method will be called multiple times even when you click on the selector element just once.




About the Author

About Thomas

Thomas Duda is a web designer who lives in Bakersfield, CA with his wife and dogs. He is also interested in: Blogging, Writing, Vaping, Fishing, Swimming and Drawing.

Leave a Reply