Articles tagged "html"

1 min readBeginner

How to Change a DOM element's class with JavaScript

If you want to change element class using javascript you can try: document.getElementById("ElementId").classList.add('NewClass') to add a new class. Alternative methods are remove and contains. Check here for more examples and alternatives using jQuery or coe for older browsers.

2 min readBeginner

JavaScript Links: # vs javascript:void(0)

In this article we explain the differences of using "#" or "javascript:void(0)" in the href attribute. We warn you that for modern javascript you should avoid using this values in the href since it's a bad practice.

1 min readBeginner

How to Redirect using HTML

To redriect using HTML add a meta with the desired url. Check here for more details

2 min readBeginner

How to create an HTML button that acts like a link?

When using only HTML, you have to use `

`. For Javascript use onclick event. With boostrap use the btn class. With plain CSS use the appearance: button; property. If you want to see more details read the full tutorial!
2 min readBeginner

CSS Lesson: Horizontally center a div in a div

Learn how to center a div within a div using flex, css2 and css3. We preset multiple solutions to solved this problem and with cross browser compatibility.

3 min readBeginner

Beginners: Everything you need to know about HTML Forms

Learn how to use HTML forms, how to debug using chrome dev tools and how to simulate a form request with python requests