HTML Images

Images can improve the design and the appearance of a web page. HTML Images Syntax In HTML, images are defined with the <img> tag. The <img> tag is empty, it contains attributes only, and does not have a closing tag. The src attribute specifies the URL (web address) of the image: <img src=”url“> The alt Attribute The alt attribute provides an alternate text for an […]

HTML Comments

Comment tags are used to insert comments in the HTML source code. HTML Comment Tags You can add comments to your HTML source by using the following syntax: <!– Write your comments here –> Notice that there is an exclamation point (!) in the opening tag, but not in the closing tag. Note: Comments are not […]

HTML Styles

The HTML Style Attribute Setting the style of an HTML element, can be done with the style attribute. The HTML style attribute has the following syntax: <tagname style=”property:value;“> The property is a CSS property. The value is a CSS value. You will learn more about CSS later in this tutorial. HTML Background Color The background-color property defines the background color for an HTML element. This example sets […]

HTML Basic Examples

Don’t worry if these examples use tags you have not learned. You will learn about them in the next chapters. HTML Documents All HTML documents must start with a document type declaration: <!DOCTYPE html>. The HTML document itself begins with <html> and ends with </html>. The visible part of the HTML document is between <body> and </body>. Example <!DOCTYPE html> <html> <body> <h1>My […]

HTML Introduction

What is HTML? HTML is the standard markup language for creating Web pages. HTML stands for Hyper Text Markup Language HTML describes the structure of Web pages using markup HTML elements are the building blocks of HTML pages HTML elements are represented by tags HTML tags label pieces of content such as “heading”, “paragraph”, “table”, […]