HTML basics for begginers
- Get link
- X
- Other Apps
HTML BASICS FOR BEGINNERS |
What is HTML?
HTML, or Hyper Text Markup Language, is the standard markup language used to create web pages. It provides the structure of a webpage by using a series of elements (or tags) to define the content and layout. These elements can include headings, paragraphs, images, links, and more.
Features of HTML:
- Structure: HTML provides the basic structure of websites, which can then be enhanced and modified by other technologies like CSS and JavaScript.
- Elements and Tags: HTML uses a series of tags and elements to define different types of content (e.g.,
<h1>
,<p>
,<a>
,<div>
, etc.). - Attributes: Tags can have attributes that provide additional information about the element (e.g.,
href
for links,src
for images). - Forms: HTML supports the creation of forms to collect user input.
- Media: HTML can embed images, videos, and audio files.
- Links: HTML allows the creation of hyperlinks to other documents or resources.
Pros of HTML:
- Simplicity: Easy to learn and use for beginners.
- Compatibility: Supported by all major web browsers.
- Flexibility: Can be integrated with other web technologies like CSS, JavaScript, and server-side languages.
- Static Pages: Ideal for creating static web pages quickly.
Cons of HTML:
- Limited Interactivity: Cannot create dynamic or interactive content on its own.
- Styling Limitations: Basic HTML has limited styling capabilities, requiring CSS for advanced designs.
- Not a Programming Language: HTML is a markup language and lacks logic and control structures found in programming languages.
HTML Basics
Basic Structure of an HTML Document
Every HTML document starts with a doctype declaration, followed by the
<html>
,<head>
, and<body>
elements.<!DOCTYPE html><html>
<head>
<title>My First Webpage</title>
</head>
<body>
<h1>Welcome to My First Webpage</h1>
<p>This is a paragraph of text on my webpage.</p>
</body>
</html>
Common HTML Elements
Headings: Define headings using
<h1>
to<h6>
.html<h1>This is a Heading 1</h1> <h2>This is a Heading 2</h2>
Paragraphs: Define paragraphs using
<p>
.html<p>This is a paragraph of text.</p>
Links: Create hyperlinks using the
<a>
tag.html<a href="https://www.example.com">Visit Example</a>
Images: Embed images using the
<img>
tag.html<img src="image.jpg" alt="Description of Image">
Lists: Create ordered (
<ol>
) and unordered (<ul>
) lists.html<ul> <li>Item 1</li> <li>Item 2</li> </ul> <ol> <li>First item</li> <li>Second item</li> </ol>
Tables: Define tables using
<table>
,<tr>
,<th>
, and<td>
.html<table> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>Data 1</td> <td>Data 2</td> </tr> </table>
HTML Forms
Forms collect user input.
html<form action="/submit_form" method="post"><label for="name">Name:</label> <input type="text" id="name" name="name"> <input type="submit" value="Submit"> </form>
Contributing:
Contributions are welcome! If you have any suggestions or improvements
feel free to open an issue or submit a pull request.
- Get link
- X
- Other Apps
Comments
Post a Comment