HTML, or HyperText Markup Language, is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as CSS (Cascading Style Sheets) and JavaScript.
Structure of an HTML Document
An HTML document is structured with a set of tags. Here's a basic structure:
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
</body>
</html>
Elements
HTML elements are the building blocks of HTML pages. They tell the browser how to display the content.
Example Elements
<h1>
to<h6>
: Define HTML headings.<p>
: Defines a paragraph.<a>
: Defines a hyperlink.<img>
: Defines an image.
Attributes
Attributes provide additional information about an element.
Example Attributes
href
: Specifies the URL of the link for the<a>
element.src
: Specifies the source of the image for the<img>
element.
HTML vs. CSS
HTML is used to structure a web page, while CSS is used to style the HTML elements.
HTML Example
<p style="color: red;">This is a red paragraph.</p>
CSS Example
p {
color: red;
}
Further Reading
For more information on HTML, you can visit the W3Schools HTML Tutorial.
HTML is the foundation of web development. Understanding HTML is crucial for creating websites and web applications. Keep exploring and expanding your knowledge in this field! 🌐