Basics of HTML and CSS

Capítulo 32

Estimated reading time: 3 minutes

+ Exercise
Audio Icon

Listen in audio

0:00 / 0:00
Understanding HTML and CSS

Notions of HTML and CSS

HTML and CSS are two of the main languages ​​used to create web pages. HTML is responsible for structuring the content of the page, while CSS is responsible for its visual presentation.

HTML

HTML is a markup language that allows you to define the structure of the content of a web page. It is composed of a series of tags (or elements) that are used to define different parts of the page, such as titles, paragraphs, images and links.

For example, the <h1> tag is used to define a top-level heading, while the <p> tag is used to define a paragraph of text. The <img> tag is used to insert an image on the page and the <a> tag is used to create a link to another page.

CSS

CSS is a style language that allows you to define the visual appearance of the web page. It is used to define the colors, fonts, sizes and placement of elements on the page.

For example, you can use CSS to define that all top-level headings (<h1>) should be displayed in red and in a font that is larger than the rest of the text. In addition, it is possible to use CSS to define that an image should be displayed to the right of the text and with a margin of 10 pixels.

Continue in our app.
  • Listen to the audio with the screen off.
  • Earn a certificate upon completion.
  • Over 5000 courses for you to explore!
Or continue reading below...
Download App

Download the app

Integration between HTML and CSS

To use CSS in an HTML page, it is necessary to define a relationship between the two files. This can be done in two ways: using the <style> tag within the HTML file itself or using an external CSS file.

In the first case, it is possible to define the style rules directly inside the HTML file, using the <style> tag. In the second case, it is necessary to create a separate CSS file and refer to it within the HTML file using the tag <link>.

Conclusion

HTML and CSS are two essential languages ​​for creating web pages. While HTML is responsible for structuring the content, CSS is responsible for its visual presentation. The integration between the two languages ​​allows you to create web pages with a professional and attractive design.

Now answer the exercise about the content:

_What is the role of HTML and CSS in creating web pages?

You are right! Congratulations, now go to the next page

You missed! Try again.

HTML and CSS are two core components of web design. HTML is used for structuring the content of web pages through the use of various tags such as headings, paragraphs, images, and links, which establish the layout and organization of the content. CSS, on the other hand, focuses on the visual styling: defining fonts, colors, and the positioning of elements on the page. Together, they work integratively to deliver a cohesive web page.

Next chapter

Static website development

Arrow Right Icon
Free Ebook cover Basic computer course for beginners
89%

Basic computer course for beginners

4.44

(27)

36 pages

Download the app to earn free Certification and listen to the courses in the background, even with the screen off.