HTML Coding

Categories: Website Development
Wishlist Share
Share Course
Page Link
Share On Social Media

About Course

Here is a beginner’s guide to HTML:
1. What is HTML?
HTML (HyperText Markup Language) is the standard language for creating web pages. It provides the structure and content of a web page using a system of “tags” and “elements.”
2. Setting up your environment:
  • Text Editor: 
    A basic text editor (like Notepad on Windows or TextEdit on macOS) is sufficient for learning. For more advanced features and extensions, consider using a code editor like Visual Studio Code (VS Code).
  • Web Browser: 
    A modern web browser (Chrome, Firefox, Edge, Safari) is needed to view your HTML files.
3. Basic HTML Document Structure:
An HTML document typically follows this structure:
Code
 
<!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <meta name="viewport" content="width=device-width, initial-scale=1.0">    <title>My First Web Page</title></head><body>    <h1>Welcome to my page!</h1>    <p>This is a paragraph of text.</p></body></html>
  • <!DOCTYPE html>: Declares the document type as HTML5.
  • <html lang="en">: The root element of the HTML page, specifying the language as English.
  • <head>: Contains metadata about the page (not visible on the page itself), such as character set, viewport settings, and the page title.
  • <title>: Sets the title that appears in the browser tab.
  • <body>: Contains all the visible content of the web page.
Show More

Course Content

Introduction
HTML, or HyperText Markup Language, is the foundational language for creating web pages and defining their structure. It is not a programming language but a markup language that uses elements and tags to describe content. Key Concepts: Elements and Tags: HTML documents are built using elements, which represent different parts of a web page (e.g., headings, paragraphs, images). Elements are defined using tags, which are keywords enclosed in angle brackets (e.g., <h1>, <p>, <img>). Most elements have an opening tag and a closing tag (e.g., <h1> and </h1>), with the content placed in between. The closing tag includes a forward slash before the element name. Some elements are self-closing and do not require a separate closing tag (e.g., <br> for a line break, <img> for an image). Basic Document Structure: Every HTML page begins with a declaration, which defines the document type. The entire HTML content is enclosed within the and tags. The section contains metadata about the page (e.g., title, character set, links to stylesheets), which is not directly visible on the page. The section contains all the visible content of the web page. Example of a basic HTML structure: Code <title>My First Web Page</title> <h1>Welcome to my page!</h1> <p>This is a paragraph of text.</p> Common Elements: Headings: <h1> to <h6> (for different levels of headings). Paragraphs: <p> (for blocks of text). Links: <a> (for creating hyperlinks to other pages or resources). Images: <img> (for embedding images). Lists: <ul> (unordered list), <ol> (ordered list), and <li> (list item). How to get started: Create a new text file and save it with a .html extension (e.g., index.html). Write your HTML code in the file using a text editor (like VS Code, Notepad++, or Sublime Text). Open the .html file in a web browser to view your web page.