HTML Course
HTML Course
HTML Course
This course is divided into four parts. Here's a brief outline so you'll know what
to expect:
3. Intro to CSS
By the time you get to this lesson, you'll know how to create a web page—but
only a simply and somewhat boring one. So in this lesson, we'll learn how to
add style to a web page through the use of Cascading Style Sheets (CSS).
The element for making link is called <a>, it’s not called link,
it’s called <a>.
<a> stands for anchor, because an <a> element anchors an
address to a piece of text on the page.
There a couple things we need an <a>to include in order to
make a link. The text that the user clicks on follow the link,
and the URL of the page we’re linking to.
The opening tag for the <a> element has this extra little bit in
it that we haven’t seen in HTML tags before.
<a href=’’http://example.net”>The example page</a>
written in red, dark blue and green is a HTML attribute.
Written in green is an attribute name. and written in red is
the value of attribute
The name href stands for Hypertext Reference, and it used
with <a> and a few other tags that link to another document.
You won’t ever see href on a paragraph or an emphasis tag
or something else.
<a> element is an inline element
Then, there’s the contents of <a> element, which becomes
the text that appears on the page. Then there’s the closing
<a> tag. See the example above.
ADDING IMAGES
Element for image is <img>, and works a lot like the a
element for links but with some important differences.
The <a> element for links uses single attribute named href
whose value is the URL of the page you want to link it to, but
The <img> element uses two attributes; src and alt.
<img src=”https://encrypted-tbn0.gstatic.com/images”
<alt=”beautiful nature photos” >
The text that’s shows up here is usually called alt text.
Src stand for source and it’s the URL of the image that you
want to appear in your own webpage.
And alt stand for alternate it’s text dicription of that image.
You need to include both of those attributes when you write
HTML.
The src attribute is there to tell the browser where to get the
image from, what is the source of the image.
The alt attribute is there to tell the browser what text to
show if it can’t display the image. For instance, the alt text
will be displayed if the file is missing from the server or if the
users network connections stops working before that image
can be loaded which is really common on mobile for
instances.
The <img> element is an inline element