AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
HTML Tutorial

HTML image size link background


<< Previous Page
HTML colors, text, background and border
Next Page >>
HTML table style


HTML Tutorial » HTML image size link background

Images are very important to design as well as to describe many complex concepts on your web page.
This tutorial will guide you through simple steps to use images in your website as: size, link and background. Images can improve the design and the appearance of a web page.

Syntax:

HTML image size: width and height - using inline CSS
<img src="link" width="value" height="value"/>

HTML image link adding image size - using inline CSS
<a href="link"><img src="link_imagine" width="value" height="value"/></a>

HTML image background - using inline CSS
<body background="link_image">

 

HTML image size - width and height - examples

You can insert any image in your website by using <img> tag.

In the next example we are set up Image Width and Image Height for web page using width="value" height="value" applied to <img src="link"/>
Let's have an example with: <img src="link"/>.

Example
<!DOCTYPE html>
<html>
<head>
<title>Set up Image Width and Height for web page</title>
</head>

<body>
<h1>Set up Image Width and Height for web page</h1>
<p> For this picture we set 300px width and 210px height </p>
<img src="https://www.agernic.com/templates/mariwel.jpg" width="300" height="210"/>
</body>
</html>
Note: In the above example I used inline CSS, but it is better to avoid this and use external CSS

Related subjects:
HTML Image Size HTML Image Link HTML Image Background

 

HTML image link adding image size - using inline CSS

To use an image as a link, you must put the <img> tag inside the <a> tag without border as example 3.

Let's have an example how to insert image as link in your web page with style: border:2px #03C dotted.
By default, image will have a border around it. A thickness of 0 means, no border around the picture.

Example
<!DOCTYPE html>
<html>
<head>
<title>HTML image link adding image size - using inline CSSt</title>
</head>

<body>
<h1>HTML image link adding image size - using inline CSS</h1>
<p style="color:green"> Let's have an example how to insert image as link in your web page.
using style with width, height and border 2px </p>
<a href="https://www.agernic.com/web-templates.html">
<img src="https://www.agernic.com/templates/mariwel.jpg"
alt="HTML tutorial" style="width:350px; height:300px; border:2px #03C dotted;">
</a>
</body>
</html>
Note: In the above example I used inline CSS, but it is better to avoid and use external CSS

 

HTML image background - using inline CSS

On the previous page we learned how to use color for the background.
Now, we will see how to use an image as a background on a web page.

Let's have an example using:
<body background="link_image">

Example
<!DOCTYPE html>
<html>
<head>
<title>HTML image background - using inline CSS</title>
</head>

<body background="https://www.agernic.com/color_picker.jpg">
<h1>HTML image background - using inline CSS</h1>
<p style="color:green">HTML image background - using inline CSS
with an example, how to insert image as link in your web page.
using style with width, height and border 2px </p>
<a href="https://www.agernic.com/web-templates.html">
<img src="https://www.agernic.com/templates/mariwel.jpg"
alt="HTML tutorial" style="width:350px; height:300px; border:2px #03C dotted;">
</a>
</body>
</html>
Note: The <body> background attribute is not supported in HTML5. Better way use CSS instead


<< Previous Page
HTML colors, text, background and border
Next Page >>
HTML table style

 



HTML image, insert html image size, image link, insert image background
HTML image, size, link and image background - html tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


HTML Img Background
HTML Image Link
HTML Image Size
HTML Text Style
HTML Text Align
HTML Text Size
HTML Text Color Style
HTML Text Color
HTML Table Color
HTML Table Row Colspan
HTML Table Width
HTML Table Style
HTML Table Border
HTML Table
HTML Font Face
HTML Font Size
HTML Font Color
HTML Headings
HTML div border color
HTML div class
HTML class container
HTML form action
HTML comment
HTML link new tab
HTML link underline
HTML link tag
HTML button action
HTML button onclick
HTML button link
HTML table style
HTML image
HTML colors
HTML div style
Text, paragraf in HTML
HTML Tags Attributes
HTML - Elements
HTML Introduction
Home HTML Tutorial
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Send forgot password by mail or message ...
PHP MySQL simple login system...
Check for duplicate username live or ema...
How to create simple search engine using...
Diseño de sitio web CSS Layout...
Diseño de caja flexible CSS3...
Botones en CSS...
ID y Clase, Diferencias entre Class e Id...
Esquina redondeada CSS...
Tamaño de caja css box-sizing: border-b...
Alineación CSS...
Altura y Anchura CSS...
Bordes CSS...
Margen CSS...
Relleno CSS...
Modelo de caja CSS...
Tablas CSS...
Listas CSS...
Enlaces CSS...
Texto CSS...