Head:: Begins With - and Ends With Every HTML Document Consists of A Head and A Body
Head:: Begins With - and Ends With Every HTML Document Consists of A Head and A Body
DOCTYPE HTML>
And ends with </HTML>
Every HTML document consists of a head and a body.
Head:
Contains basic information such as title, etc.
<Head>
</Head>
Title:
The title.
<Title>
</title>
Body:
Contains texts links tec.
<body>
</body>
Paragraphs:
<p>
</p>
Bold text:
<Strong>
</Strong>
The things inside the <>s are called tags
Hyperlinks:
<a href="http://www.codecademy.com">My Favorite Site!</a>
1.
First, there's an opening <a>tag and that tag has an attribute called href.
The href value tells your link where you want it to go, in this
casehttp://www.codecademy.com.
2.
Then you have a description of your link between your opening <a> and your
closing</a> tags. This is what you will be able to click on.
3.
Images:
We use an image tag, like so:<img>. This tag is a bit different from the others.
Instead of putting the content between the tags, you tell the tag where to get the
picture using src. It's also different because there is no ending tag. It has / in the tag
to close it: <img src="url" />.
Check out the tag to the rightit adds a picture of a rubber duck to the page! (You
can see it by clicking on the Preview button.)
See the web address (or URL) after src=?
It's"http://s3.amazonaws.com/codecademy-blog/assets/f3a16fb6.jpg" . That tells
the <img> tag where to get the picture from!
Every image on the web has its own image URL. Simply right-click on an image and
choose "Copy image URL." Paste that URL in quotes after src= to insert with
your <img> tag.
Ordered lists:
<!DOCTYPE html>
<html>
<head>
<title>Lists</title>
</head>
<body>
<h1>List of my favorite things</h1>
<ol>
<li>Raindrops on roses</li>
<li>Whiskers on kittens</li>
<li>Bright copper kettles</li>
<li>Warm woolen mittens</li>
</ol>
</body>
</html>
Unordered lists:
<h2>Taco Ingredients</h2>
<ul>
<li>Cheese</li>
<li>Sour Cream</li>
</ul>
Comment:
<!--Yo -->
Font size change:
<p style=font-size= x px>
Color change:
<p style=color:red>
If you want to change both color and font then add a semi colon in between of them.
Font style change:
Aligning text:
<h1 style="text-align:center/right/left">