Coding with HTML – 101 Basics – Great start for beginners. Imagine you’re building a house. In this analogy, HTML is like the blueprint for your house. Just like a blueprint outlines where the walls, doors, and windows go, HTML tells a web browser (like Chrome, Firefox, or Safari) where to put things on a web page. Things like text, pictures, buttons, and links to other pages.
HTML stands for HyperText Markup Language. “Markup language” means it’s a way of marking up a document with codes that tell the browser how to display the document’s contents. These codes are called “tags.”
So, if you wanted to add a title, a paragraph, or an image to your webpage, you would use different tags to tell the browser where to put these elements and how to show them to people who visit your page.
It’s like telling the browser: “Here’s a photo to display, put it right here; and here’s a headline, make it big and at the top.” HTML is the foundation of all websites, and understanding it is the first step in creating your own web pages.
Coding with HTML – 101 Basics with Examples and Explanations
Coding with HTML (HyperText Markup Language) is essential for creating web pages and web applications. HTML is not a programming language; it is a markup language that defines the structure of your content. Here’s a basic introduction to HTML with examples and explanations to get you started.
HTML Structure
An HTML document is structured between the tags, with two main parts: the head () and the body ().
- : Contains meta-information about the document, like its title and links to stylesheets.
- : Contains the content of the document, such as text, images, and other media.
My First Heading
My first paragraph.
Basic Elements
Headings
HTML headings are defined with the
to
tags, where
defines the most important heading and
the least important.
This is a Heading
This is a smaller Heading
Paragraphs
The
tag defines a paragraph.
This is a paragraph.
Links
The tag defines a hyperlink, which is used to link from one page to another.
This is a link
Images
The tag is used to embed an image in an HTML page. The src attribute specifies the path to the image.
Lists
There are two types of lists in HTML: ordered and unordered.
-
- Ordered List: Each list item is numbered.
-
- First item
-
- Second item
-
- Unordered List: Each list item is bulleted.
-
- First item
-
- Second item
Forms
Forms are defined with the