HZA3b/0/2?curriculum - Id 50579fb998b470000202dc8b HTML and Css User Name: Soni112 Email: PW: pss123PSS$
HZA3b/0/2?curriculum - Id 50579fb998b470000202dc8b HTML and Css User Name: Soni112 Email: PW: pss123PSS$
com/courses/web-beginner-en-
HZA3b/0/2?curriculum_id=50579fb998b470000202dc8b
HTML and CSS
A markup language is a programming language used to make text do more than just sit on a page: it can
turn text into images, links, tables, lists, and much more. HTML is the markup language we'll be learning.
What makes webpages pretty? That's CSS—Cascading Style Sheets. Think of it like skin and makeup that
covers the bones of HTML. We'll learn HTML first, then worry about CSS in later courses.
a. Always put <!DOCTYPE html> on the first line. This tells the browser what language it's reading (in this
case, HTML).
b. Always put <html> on the next line. This starts the HTML document.
c. Always put </html> on the last line. This ends the HTML document.
Instructions
1. Go ahead and put the three lines mentioned above into test.html, which is now blank.
2. In between the second and last line (between the <html> and the </html>), feel free to write
whatever message you like.
<!DOCTYPE html>
<html>
Hi I am Parag Soni
</html>
Basic terminology
To learn more HTML, we should learn how to talk about HTML. Already you have seen we use <>s a lot.
Instructions
o/p
There are always two parts to an HTML file: the head and the body. Let's start with the head.
The head contains information about your HTML file, like its title. The title is what we see in the browser's
title bar or page tab. For example the title of this page is "HTML Basics | Codecademy".
Instructions
Let's add a head and a title to our webpage. If you get stuck at any point, click "Stuck? Get a hint!" below
for an example.
Hint
<html>
<head>
<title>My Webpage</title>
</head>
</html>
Paragraphs in the body
Great job! To review, an HTML file has both a head and a body. The head is where you put information
about your HTML file, like its title.
The body is where you put your content, such as text, images, and links. The content in the body is what
will be visible on the actual page.
The body goes inside the <html> tags, right after the <head> tags, like this:
<html>
<head>
<title>My Webpage</title>
</head>
<body>
</body>
</html>
Instructions
1. Underneath the closing </head>tag, put an opening <body> tag and a closing </body> tag, like in the
example above.
2. Inside the body, create two paragraphs. Each paragraph starts with an opening <p> tag and ends
with a closing </p> tag. We can write content in between the tags, like this:
<body>
<p>Hello world!</p>
</body>
O/P
INTRODUCTION TO HTML
Review
Congratulations on completing the first lesson of HTML & CSS! You are well on your way to
becoming a skilled web developer.
1. HTML stands for HyperText Markup Language and is used to create the structure and
content of a webpage.
2. Most HTML elements contain opening and closing tags with raw text or other HTML
tags between them.
3. Single-closing tags cannot enclose raw text or other elements.
4. Comments are written in HTML using the following syntax: <!-- comment -->.
5. HTML elements can be nested inside other elements. The enclosed element is the
child of the enclosing parent element.
6. Whitespace between HTML elements helps make code easier to read while not
changing how elements appear in the browser.
7. Indentation also helps make code easier to read. It makes parent-child relationships
visible.
8. The <!DOCTYPE html> declaration should always be the first line of code in your HTML
files.
9. The <html> element will contain all of your HTML code.
10. Information about the web page, like the title, belongs within the <head> of the page.
11. You can add a title to your web page by using the <title> element, inside of the
head.
12. A webpage's title appears in a browser's tab.
13. Code for visible HTML content is placed inside of the <body> element.
What you learned in this lesson constitutes the required setup for all HTML files. The rest of
the course will teach you more about how to add content using HTML.