A. Melih Yılmaz

Structure and appearance on a web page

Exploring the roles of HTML and CSS with a small card example.

Browser screenshot of the HTML/CSS exercise prepared for this article.
Browser screenshot of the HTML/CSS exercise prepared for this article.

HTML defines a page’s semantic structure. Headings, paragraphs, links and images are parts of that structure. CSS controls appearance, including colour, spacing, font size and layout.

This example uses a heading and paragraph inside an article element. A max-width and padding keep the card readable on smaller screens. The screenshot shows an example made for this article, not a client project.

<article class="sample-card">
  <h2>Learning together</h2>
  <p>A small HTML and CSS exercise.</p>
</article>
All articles