Digital Applications
Developing Web Products
Understanding the purpose and properties of HTML and CSS
🤓 Study
📖 Quiz
Play audio lesson
Understanding the purpose and properties of HTML and CSS
Understanding HTML and CSS
HTML Basics
- HTML stands for HyperText Markup Language and is the standard language for creating web pages.
- It uses tags enclosed in angle brackets (< >) to structure content on a webpage.
- Commonly used tags in HTML include
<h1>
,<p>
,<div>
,<img>
,<a>
, and<span>
. - A HTML document is made up multiple HTML elements introduced with a start tag, and ended with an end tag.
- Basic layout structure of a HTML file includes a
<!DOCTYPE html>
, a<html>
,<head>
and<body>
tag.
CSS Basics
- CSS stands for Cascading Style Sheets and it is used for styling HTML documents.
- CSS can control the layout of multiple webpages all at once - a well used feature includes creating a consistent theme across webpages.
- A CSS rule-set consists of a selector and a declaration block. The selector points to the HTML element to style, and the declaration block specifies how.
- Commonly used properties in CSS include:
color
,font-size
,background-color
,margin
,padding
, andwidth
.
HTML and CSS Together
- HTML is used to structure content, while CSS is used for formatting structured content.
- HTML and CSS are meant to work together. HTML files point to one or more CSS files to retrieve style information.
- CSS can be implemented in three ways in an HTML file: inline, internal, and external.
- CSS selectors can directly assign styles to HTML elements or classes and ids defined within HTML content.
Importance of HTML & CSS
- Both HTML and CSS form fundamental components of web development and are essential for creating user-friendly websites.
- HTML provides Semantic meaning to your website content: it tells the browser what type of content is on your page.
- CSS enhances HTML by adding styles, making your website aesthetically pleasing and improving user experience.
- Thorough understanding of HTML and CSS is foundational to mastering more advanced web technologies.