Web Design 01
Web Design 01
• Invented by Tim Berners-Lee in 1991, HTML was originally created to help researchers
share documents online.
• In 2012, HTML5 was introduced — the latest and most powerful version, supporting
multimedia, mobile-friendly design, and more.
This course is for beginners — especially aspiring web designers and developers — who want
to learn how to build websites. If you’ve ever wondered how websites are made, this is the
perfect place to start!
No programming experience is required, but you should be comfortable with the basics of using
a computer. Here's what will help:
• Experience with a text editor (like Notepad, Notepad++, or Visual Studio Code)
• Knowing how to create and save files on your computer
• Basic skills like navigating folders/directories
• A simple understanding of image formats like .jpg, .png
Final Note
Learning HTML is the first step toward becoming a web developer. Once you master it, you’ll be
ready to learn CSS (for design) and JavaScript (for interaction). So, let’s get started and build
your first web page!
Introduction to HTML
What is HTML?
HTML stands for Hypertext Markup Language. It is the standard language used to create and
design webpages. Think of HTML as the skeleton of a webpage — it gives structure to all the
text, images, links, and other content you see on the internet.
The <p> tag tells the browser that the text is a paragraph.
Key Concepts:
• Markup Language: Uses tags to define elements within a document for the browser to
render and display content properly.
Purpose of HTML
Originally designed to structure documents (like academic papers), HTML is now used to build
and format websites with various multimedia content.
Tag Description
• Always start with the <!DOCTYPE> declaration to inform the browser of the HTML
version.
This is the simplest and most common declaration. It ensures your page will be rendered
using the latest HTML standards.
Heading Tags
HTML provides six levels of headings, from <h1> (largest/most important) to <h6>
(smallest/least important). They structure the document and are typically displayed in bold.
Example:
Paragraph Tag
Example:
Each paragraph starts on a new line and adds space above and below the content.
Use the <br /> tag to insert a line break without starting a new paragraph. It's a self-closing
(empty) tag.
Example:
Centering Content
The <center> tag centers the content horizontally. Note: this tag is deprecated in HTML5 and
CSS should be used instead.
Example:
Horizontal Lines
The <hr /> tag is used to insert a horizontal rule (line) that separates content.
Example:
Preserve Formatting
Use the <pre> tag to preserve whitespace, tabs, and line breaks.
Example:
Nonbreaking Spaces
To prevent browsers from breaking a line of text at a space, use (non-breaking
space).
Example:
1. id Attribute
• Used to uniquely identify an element on the page.
• Each id must be unique.
2. title Attribute
Adds a tooltip that shows when the mouse hovers over the element.
3. class Attribute
• Groups similar elements.
• Can be used in CSS to style multiple elements.
4. style Attribute
• Lets you write CSS rules directly in the tag.
Internationalization Attributes
These attributes help you control language and text direction in your HTML pages.
Attribute Use Example Value
dir Text direction ltr (left to right), rtl (right to left)
lang Page/document language en, fr, sw, etc.
xml:lang Same as lang but for XHTML en, fr, etc.
lang Example:
Generic Attributes (Used in Many Tags)
Attribute Description Example Values
align Aligns text horizontally left, center, right
valign Aligns content vertically (tables) top, middle, bottom
bgcolor Sets background color #FF0000, red, rgb(0,0,0)
background Sets a background image background="img.jpg"
width Sets width (in px or %) width="300"
height Sets height height="100"
HTML formatting
• Bold (<b>)
• Italic (<i>)
• Underlined (<u>)
• Strike (<strike>)
• Monospaced (<tt>)
• Superscript (<sup>)
• Subscript (<sub>)
• Inserted (<ins>)
• Deleted (<del>)
• Larger (<big>)
• Smaller (<small>)
• Larger (<big>)
• Smaller (<small>)
6. <abbr> – Abbreviation
The <abbr> tag is used to show the full form of an abbreviation when the user hovers over it.
Example:
7. <cite> – Citation
The <cite> tag is used to reference a title of a creative work (books, movies, articles).
Example:
Note: bgcolor and align are outdated; prefer using CSS like style="background-color:white;" and
CSS centering methods.
<abbr> – Abbreviation
Used to represent abbreviations. Use the title attribute to provide the full form.
Example:
When users
hover, they'll see the full form “Abhishek”.
<acronym> – Acronym (Deprecated in HTML5)
Was used to mark acronyms, but now <abbr> is preferred.
Example:
Note: Avoid using <acronym> in modern HTML. Use <abbr> instead.
<dfn> – Definition
Used to introduce a term being defined.
Example:
<cite> – Citation
Used to reference the title of a work (like books, articles, or websites). Often italicized.
Example:
<var> – Variable
Used to denote variables in code or formulas.
Example: