Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
132 views

HZA3b/0/2?curriculum - Id 50579fb998b470000202dc8b HTML and Css User Name: Soni112 Email: PW: pss123PSS$

The document provides an introduction and review of key concepts learned in HTML & CSS lesson 1, including: 1. HTML is used to create webpage structure and content using opening and closing tags. 2. Most HTML elements contain text or other tags between opening and closing tags. 3. The <!DOCTYPE html> declaration and <html> tags form the required skeleton for all HTML files.

Uploaded by

Parag Soni
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views

HZA3b/0/2?curriculum - Id 50579fb998b470000202dc8b HTML and Css User Name: Soni112 Email: PW: pss123PSS$

The document provides an introduction and review of key concepts learned in HTML & CSS lesson 1, including: 1. HTML is used to create webpage structure and content using opening and closing tags. 2. Most HTML elements contain text or other tags between opening and closing tags. 3. The <!DOCTYPE html> declaration and <html> tags form the required skeleton for all HTML files.

Uploaded by

Parag Soni
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

https://www.codecademy.

com/courses/web-beginner-en-
HZA3b/0/2?curriculum_id=50579fb998b470000202dc8b
HTML and CSS

User Name : Soni112


Email: parag.soni@tatatechnologies.com
PW: pss123PSS$
HTML stands for HyperText Markup Language. Hypertext means "text with links in it." Any time you
click on a word that brings you to a new webpage, you've clicked on hypertext!

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.

The first thing we should do is set up the skeleton of the page.

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.

1. Things inside <>s are called tags.


2. Tags nearly always come in pairs: an opening tag and a closing tag.
3. Example of opening tag: <html>
4. Example of closing tag: </html>
You can think of tags as being like parentheses: whenever you open one, you should close it. Tags
also nest, so you should close them in the right order: the most recently opened tag should be the first
one closed, like in the example below.

<first tag><second tag>Some text!</second tag></first tag>


The last exercise taught us how to set up our HTML file. Everything we do now will go
between <html> and </html>.

Practice makes perfect! One more time:

Instructions

1. Put in the <!DOCTYPE HTML> tag.


2. Put in the <html> opening and closing tags.
3. Between the <html> tags, write whatever you like.
4. Press Save & Submit Code to see what you've written appear on the page!

o/p

Make the head


Everything in our HTML file will go between the opening <html> and closing </html> tags.

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.

1. Add an opening <head> tag and closing </head> tag.


2. Between the <head> tags, add in an opening <title> tag and closing </title> tag.
3. Between the <title> tags, write in a title for your page. For example, "My Webpage."
4. Press "Save & Submit Code" to continue

Hint

Your code should look something like this:

<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.

Let's review what you've learned so far:

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.

You might also like