Front-end is everything a person sees and interacts with on a website or app: layout, colors, menus, forms, buttons. It's the interface layer, which talks to the back-end to fetch and send data.
How it works
In the browser, front-end relies on three core technologies:
- HTML: defines the structure and content of the page.
- CSS: handles appearance, such as colors, spacing and responsiveness.
- JavaScript: adds behavior, such as reacting to clicks and updating data.
On top of that are frameworks and libraries, like React, Vue and Svelte, that organize the interface into reusable components.
When you click "Buy", the front-end sends a request to an API. The back-end processes it and responds, and the front-end shows the result on screen.
Important best practices: mobile responsiveness, accessibility, loading speed and visual clarity.
Practical example
You want a button that shows a message when clicked:
<button id="ola">Clique aqui</button>
<p id="msg"></p>
<script>
document.getElementById('ola').addEventListener('click', () => {
document.getElementById('msg').textContent = 'Pedido enviado!';
});
</script>That's already front-end: structure, interaction and visual feedback. In an e-commerce store, the same principle applies to cart, filters and checkout.
What it's for
- User experience: a clear interface helps customers complete a purchase.
- Brand: it's the first impression of your product.
- Data connection: displays information from the back-end and APIs.
- AI prototyping: code agents can generate screens from a description, and you adjust the result.
In agent workflows, it's common to split the work: one agent handles front-end, another back-end and another tests, as is done in squads at bridgecode.
Difference between front-end and back-end
Front-end is the visible part, run on the user's device. Back-end runs on the server, handles business rules, database and security. Someone who works with both is called full-stack.
Tip: if you're starting out, learn HTML and CSS first, then JavaScript. With AI, you can ask for examples and explanations, but understanding the basics is what lets you review what the agent generated and fix errors safely.