Introduction to HTML: creating your first website
Welcome to this introductory HTML tutorial! In this article, you will learn the basics of HTML and how to create your first web page from scratch.
HTML (Hypertext Markup Language) is a markup language used to structure content on the web. It is the primary language used to create websites and provides the basic structure of a page, defining how elements should be displayed in a browser.
To get started, make sure you have a text editor ready. You can use any simple text editor such as Notepad (Windows) or TextEdit (Mac). Once you are ready, let's start creating your first web page.
Creating the HTML file
Step 1: Open your text editor and create a new file.
Step 2: Save the file with an .html extension, for example, "index.html".
The basic structure of HTML
Here is the basic structure of an HTML document:
<html>
<head>
</head>
<body>
<!-- Aquí irá el contenido de tu página web -->
</body>
</html>
Now that you have the basic structure, you can start adding content to your website. You can insert text, images, links and much more using HTML tags.
Adding content to your website
Use HTML tags to add content to your web page. For example, you can use the tag to add a main heading, the tag to add a paragraph, and the to add an image. Here is an example:
<h1>¡Bienvenido a mi página web!</h1>
Esta es mi primera página web creada con HTML.
<img src="imagen.jpg" alt="Mi imagen" />
Applying styles with CSS
Once you have created the basic structure of your web page, you can apply styles using CSS (Cascading Style Sheets). CSS allows you to control the appearance of your HTML elements, such as colours, fonts, sizes and much more.
To add CSS to your web page, you can use the tag within the section of your HTML file. For example:
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
h1 {
color: #ff0000;
}
p {
font-size: 18px;
}
<h1>¡Bienvenido a mi página web!</h1>
Esta es mi primera página web creada con HTML.
Conclusion
Congratulations! You have created your first website using HTML and CSS. Now, you can continue to learn and explore different CSS tags and properties to further customise your web page.
Remember to continually practice and experiment with different elements and styles to improve your skills at web developmentHave fun creating your own website!
I recommend you to continue learning about HTML and CSS at W3Schoolsa free online resource offering detailed tutorials and practical examples.
I hope this tutorial has helped you to understand the basics of HTML and to create your first website. Good luck on your web development journey!