Article image Basics of HTML and CSS

Basics of HTML and CSS

Page 32 | Listen in audio

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.

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.

Article image Static website development

Next page of the Free Ebook:

33Static website development

1 minutes

Earn your Certificate for this Course for Free! by downloading the Cursa app and reading the ebook there. Available on Google Play or App Store!

Get it on Google Play Get it on App Store

+ 6.5 million
students

Free and Valid
Certificate with QR Code

48 thousand free
exercises

4.8/5 rating in
app stores

Free courses in
video, audio and text