Search the courses, subjects, tracks, games and features, or jump straight to a page.
Learn it your way
A short class with Sarah and her students. The other ways are under More.
Sign up free to listen. Transcripts are free to read.
Today, we’re going to learn about HTML, which stands for HyperText Markup Language. It is the standard language for creating web pages.
What does 'markup' mean in this context?
Great question! 'Markup' refers to the way we use tags to define elements on a web page. For instance, we use <h1> for the main heading.
So, every time I see a web page, HTML is working behind the scenes?
Absolutely! Every element you see, like text or images, is defined by HTML.
Can we see a simple example?
Sure! Let’s look at this basic code snippet: <h1>Welcome to My Website!</h1>. Here, the text 'Welcome to My Website!' is the main heading.
What happens if I change <h1> to something like <h2>?
Great inquiry! If you change it to <h2>, it will still show as a heading, but it will be smaller and less prominent than <h1>.
In summary, HTML is essential for structuring web pages and understanding its tags is crucial for any web developer.
Now, let’s discuss CSS, which stands for Cascading Style Sheets. CSS helps us style our web pages.
What kind of things can we style with CSS?
You can change colors, fonts, layouts, and even the spacing of your elements. For example, we can set the body background to a specific color.
How do we add CSS to our HTML?
We can include CSS in the same document using <style> tags or link to an external CSS file. Here's an example of inline styling: body { font-family: Arial; background-color: #f0f0f0; }
Does that mean my website can look different based on how I write my CSS?
Exactly! The same HTML structure can look completely different depending on how you style it with CSS.
To recap, CSS allows us to control the appearance of our web pages, making web design attractive and user-friendly.
Now let’s see how HTML and CSS work together in a basic example.
Can we check out the full code?
"Of course! Here's the complete code:
HTML organizes, CSS beautifies, together they make the web arise.
Imagine a chef (HTML) cooking up a dish using ingredients (tags); then a decorator (CSS) makes it look delicious and presentable on a plate.
Remember 'H1 for Heading', H for number one!
HTC - HTML for structure, CSS for style, Together for a complete website.
Term
HTML
Click to flip
Term
CSS
Click to flip
Term
Doctype
Click to flip
Term
Tags
Click to flip
HyperText Markup Language, the standard language for creating web pages.
Cascading Style Sheets, used for styling HTML elements.
A programming language that adds interactivity to web pages.
A declaration at the beginning of an HTML document that specifies the HTML version.
Special text that defines elements within HTML, enclosed in angle brackets.
This section introduces a basic HTML structure to create a simple website, emphasizing its foundational components and their purposes.
In this section, we explore the fundamental structure of a basic website using HTML, CSS, and JavaScript. It covers essential elements such as document declaration, headings, paragraphs, and styling attributes that contribute to the overall presentation of a web page.
In this section, we examine the structure of a basic website using HTML, CSS, and JavaScript. The essential components of a web page include:
HTML (HyperText Markup Language): This is the backbone of web content, providing the structure and organization of your information.
<h1> tag signifies the main heading while <p> tags are used for paragraphs.CSS (Cascading Style Sheets): CSS styles the visual aspects of our web page, determining how HTML elements appear to users.
<style> tags to apply styling to the webpage such as background color and font family.JavaScript: While not explicitly showcased in the basic example, JavaScript would typically be added to create interactive elements on the web page, such as responding to user actions.
The following code illustrates a simple website:
<!DOCTYPE html>
<html>
<head>
<title>My First Website</title>
<style>
body { font-family: Arial; background-color: #f0f0f0; }
h1 { color: navy; }
</style>
</head>
<body>
<h1>Welcome to My Website!</h1>
<p>This is my first web page.</p>
</body>
</html>
<head> section includes the title of the page and internal CSS for styling.<body> contains visible elements: the header and the paragraph that introduce the website.Understanding this basic structure lays the groundwork for more advanced web design techniques, enabling you to create more complex web solutions.