HTML (HyperText Markup Language) gives a web page its structure and meaning. A browser reads HTML elements such as headings, paragraphs, links and images, then renders them for the visitor.
.html extension, and open it in a browser.<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My first page</title>
</head>
<body>
<h1>Hello</h1>
<p>Welcome to my first web page.</p>
</body>
</html>
Save the file as test.html. Double-click it or open it from your browser. You do not need a web server for this first static example.
HTML describes document structure. CSS controls presentation, while JavaScript can add behavior and application logic. A typical page uses all three together.
Most HTML elements have an opening tag, content and a closing tag. Some elements, such as <img> and <br>, are void elements and do not have closing tags.
<strong>Important text</strong>
<em>Emphasized text</em>
Use elements for their meaning rather than only for appearance. For example, use CSS when you only want a visual style.
Browsers let you inspect the HTML they received. The exact menu varies by browser, but View Page Source and developer tools are the common options. Developer tools are especially useful because they show the live DOM after scripts have run.
Create a basic HTML page online HTML element types Page layout and structure
Also see the line break tutorial for the <br> element.
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.
19-01-2021 | |
| excellent | |