I can write text on a web page. Which part controls its structure and which part controls how it looks?
<h1>My first page</h1>
<p>I am learning to build for the web.</p>
CookieSensei starter Q&A · example discussion.
1 answer
C
Community member
Web development
HTML describes the content and structure: headings, paragraphs, links and buttons. CSS controls presentation, such as colour, spacing and layout. Start with meaningful HTML, then add a small style rule and observe the change. JavaScript is a separate tool for behaviour when the page needs it. This example keeps the same heading and adds a CSS class to style it.
<style>
.welcome { color: #216653; }
</style>
<h1 class="welcome">My first page</h1>
<p>I am learning to build for the web.</p>