HTML Link, Img, List, Span, Comment And CSS Tutorial

HTML Tag – Anchor Link HREF
HTML for Beginners
You can use HTML's tag to link to different parts of a website, to another web page, or to a separate website entirely.
HTML for Beginners
By default, it is underlined and given a bluish color, but you can override these style defaults with CSS (which a lot of people do).
Most importantly, though, this tag takes the href attribute, in which you specify which website, web page, or part of the same web page to link to.
READ ALSO » How To Make A Mobile Menu Bar With HTML, CSS, And JavaScript
In addition to the href attribute, the tag also takes the target attribute. This lets the page or website you're linking to open in another browser tab. You just need to set the value of the target attribute to blank.
HTML Image
HTML img tag is used to display image on the web page. HTML img tag is an empty tag that contains attributes only, closing tags are not used in HTML image element.
1) src
It is a necessary attribute that describes the source or path of the image. It instructs the browser where to look for the image on the server.
The location of image may be on the same directory or another server.
2) alt
READ ALSO » HTML103: HOW TO CREATE A TABLE IN HTML AND CSS
The alt attribute defines an alternate text for the image, if it can't be displayed. The value of the alt attribute describe the image in words. The alt attribute is considered good for SEO prospective.
3) width
It is an optional attribute which is used to specify the width to display the image. It is not recommended now. You should apply CSS in place of width attribute.
4) height
It h3 the height of the image. The HTML height attribute also supports iframe, image and object elements. It is not recommended now. You should apply CSS in place of height attribute.
Use of height and width attribute with img tag
You have learnt about how to insert an image in your web page, now if we want to give some height and width to display image according to our requirement, then we can set it with height and width attributes of image.
HTML Lists
HTML lists are used to present list of information in well formed and semantic way. There are three different types of list in HTML and each one has a specific purpose and meaning.
- Unordered list — Used to create a list of related items, in no particular order.
- Ordered list — Used to create a list of related items, in a specific order.
- Description list — Used to create a list of terms and their descriptions.
HTML Unordered Lists
An unordered list created using the
READ ALSO » HOW TO CREATE A TABLE IN HTML AND CSS
This is a border with none width.
This is a solid border.
This is a dashed border.
This is a double border.
This is a groove border.
This is a ridge border.
This is a inset border.
This is a outset border.
This is a hidden border.
This is a a border with four different styles.
The list items in unordered lists are marked with bullets. Here's an example:
- Chocolate Cake
- Black Forest Cake
- Pineapple Cake
- element, and each list item starts with the
- element. Ordered lists are used when the order of the list's items is important.
The list items in an ordered list are marked with numbers. Here's an example:
- Fasten your seatbelt
- Starts the car's engine
- Look around and go
The border-color specifies the color of a border.
The border-style specifies whether a border should be solid, dashed line, double line, or one of the other possible values.
The border-width specifies the width of a border.
none ? No border. (Equivalent of border-width:0;)
solid ? Border is a single solid line.
dotted ? Border is a series of dots.
dashed ? Border is a series of short lines.
double ? Border is two solid lines.
groove ? Border looks as though it is carved into the page.
ridge ? Border looks the opposite of groove.
inset ? Border makes the box look like it is embedded in the page.
outset ? Border makes the box look like it is coming out of the canvas.
hidden ? Same as none, except in terms of border-conflict resolution for table elements.