HTML Tutorial for Beginners | Complete HTML with Notes & Code

HTML Tutorial for Beginners | Complete HTML with Notes & Code

TLDR;

This video is a comprehensive HTML tutorial, guiding viewers from basic to advanced levels. It covers essential tools, HTML structure, tags, attributes, and layout techniques. The tutorial also includes practical projects to reinforce learning and introduces advanced concepts like lists, forms, and tables.

  • Setting up a coding environment with VS Code and understanding basic HTML structure.
  • Learning about HTML tags, attributes, and how to use them to create web page elements.
  • Exploring advanced layout techniques, including semantic tags and the use of divs and spans.
  • Creating lists, forms, and tables to structure and collect data on web pages.

Introduction to HTML [0:00]

The video introduces an HTML course designed for beginners to advanced learners. The course is structured into four levels, aiming to equip students with the skills to become proficient programmers. Viewers are encouraged to share their thoughts and suggestions in the comments to help tailor future content.

Setting Up the Development Environment [1:59]

The video suggests using either HTML Editor or UltraEdit as text editors, with UltraEdit being a paid software offering features like code highlighting, templates, and integration with various technologies. However, the course will primarily use Visual Studio Code (VS Code), a free code editor from Microsoft. VS Code is likened to a notebook for writing code, providing resources and tools to streamline the development process.

Downloading and Installing VS Code [4:29]

To download VS Code, search "download VS Code" on the internet and navigate to the official website. Select the appropriate version for your operating system (Windows, macOS, Linux), ensuring compatibility with your system's architecture (64-bit or 32-bit). During installation, tick all the checkboxes to ensure VS Code is fully integrated into your system.

Understanding Front-End Components: HTML, CSS, and JavaScript [5:29]

The front end of a website consists of three main components: HTML, CSS, and JavaScript. HTML provides the structure and layout, determining where elements like text, images, and buttons are placed. CSS controls the styling, including colours, fonts, and sizes. JavaScript adds functionality, defining how elements behave and respond to user interactions, such as button clicks triggering downloads.

Level 1: Basics of HTML [8:05]

Level 1 focuses on the basics of HTML, which is a markup language that defines the structure and layout of a website. HTML is used to specify where different elements should appear on a web page. The video explains how to view the HTML code of any website by right-clicking and selecting "View Page Source" or using the "Inspect" tool to see a cleaner, more organised view of the code.

Exploring HTML Code and Inspect Element [9:48]

The video explains that while you can view the HTML code of a website, you cannot simply copy it to recreate the entire site due to the presence of back-end components. The "Inspect" tool allows you to see the dimensions and structure of different elements on a web page, revealing how they are organised within boxes and levels. This tool is useful for understanding the underlying structure of a website.

Understanding HTML Tags [12:26]

HTML uses tags to create different types of items on a web page. Tags are containers that hold content, such as buttons, paragraphs, or headings. The video uses a paragraph tag as an example, showing the opening tag (<p>), the content, and the closing tag (</p>). Code editors like VS Code automatically generate the closing tag when you type the opening tag, making coding more efficient.

Creating Your First HTML File [12:59]

To create your first HTML file, open VS Code and create a new file named "index.htm". This file will serve as the home page for your website. The video highlights the advantages of using a code editor like VS Code over Notepad, including features that simplify the coding process.

Understanding the Importance of "index.htm" [14:49]

The video explains that when a server renders a web page, it looks for a file named "index.htm" to use as the home page. If this file is not present, you need to manually specify which file should be used as the home page. Using "index.htm" as the default home page is a common practice among programmers.

Using Emmet for Boilerplate Code [15:59]

Typing an exclamation mark (!) in VS Code and pressing Enter generates a boilerplate HTML code, thanks to Emmet, a built-in toolkit. This code includes essential elements needed for an HTML file. The video explains that this functionality simplifies the initial setup, saving you from writing the basic structure manually.

Utilising the Live Server Extension [16:57]

The Live Server extension automatically refreshes the web page whenever you save changes to your HTML file. To use it, right-click in the HTML file and select "Go Live". This opens the HTML page in your browser, and any changes you save will be immediately reflected without manual refreshing.

Understanding HTML Tags as Containers [18:58]

HTML tags are described as containers, similar to kitchen containers holding different ingredients. These tags hold content that is displayed on the web page, such as buttons, paragraphs, or headings. The video explains the structure of a paragraph tag, including the opening tag, content, and closing tag.

Analysing Basic HTML Structure [21:59]

The video breaks down the basic structure of an HTML page, starting with the <!DOCTYPE html> declaration, which tells the browser that the document is using HTML5. The <html> tag is the root element, containing all other elements. Inside the <html> tag, there are two main sections: <head> and <body>.

Understanding the <head> Section [24:02]

The <head> section contains metadata about the HTML document, which is not displayed on the web page. This includes information like the title, character set, and viewport settings. The viewport setting ensures the website is responsive and adapts to different screen sizes. The title, specified within the <title> tag, appears in the browser tab.

Understanding the <body> Section [25:55]

The <body> section contains all the content that is displayed on the web page, such as text, images, and other elements. The video explains that any element you want to show on the page should be placed within the <body> tag. While some elements can be omitted without causing errors, it is best practice to include all necessary tags for professional coding.

Quick Points on HTML Structure [28:07]

The video highlights key points about HTML structure, including that the <html> tag is the parent of the <head> and <body> tags. Most HTML tags have content between the opening and closing tags, but some tags, like <br> (line break), do not have a closing tag or content. The video also mentions that you can use "Inspect Element" or "View Page Source" to edit HTML in the browser.

Using Comments in HTML [31:58]

Comments in HTML are used to add notes or explanations to the code that are not displayed on the web page. Comments are useful for providing context or reminders to developers. The syntax for writing comments in HTML is <!-- comment here -->. The video explains that comments are ignored by the browser and are only visible in the code.

HTML is Not Case Sensitive [34:18]

HTML is not case-sensitive, meaning that tags written in uppercase or lowercase are treated the same. For example, <head> and <HEAD> are equivalent. This differs from some other programming languages that are case-sensitive.

Project 1: Creating a Basic Portfolio [35:27]

The first project involves creating a basic portfolio with an "index.htm" file. The task includes adding boilerplate code and printing "Hello World" or "Portfolio" on the page. Viewers are encouraged to pause the video and complete this task independently, using the knowledge gained so far.

Level 2: HTML Attributes [36:23]

Level 2 introduces HTML attributes, which add more information to tags. Attributes are used to define properties such as font size or text colour. The video explains that attributes are written within the opening tag, with a name and a value (e.g., <html lang="en">). The value can be enclosed in single or double quotes, but double quotes are preferred.

Heading Tags (h1 to h6) [38:33]

Heading tags ( <h1> to <h6> ) are used to add headings to a document. <h1> is the largest and most important, while <h6> is the smallest. The video emphasises that heading tags should be used to indicate importance, not just to change the size of the text. Font size should be controlled using CSS.

Paragraph Tag [40:57]

The paragraph tag (<p>) is used to add paragraphs of text to an HTML document. The video demonstrates how to add a paragraph and discusses how to handle long lines of text in VS Code by using the "Toggle Word Wrap" feature to improve readability.

Anchor Tag [42:47]

The anchor tag (<a>) is used to add links to other web pages or sections within the same page. The href attribute specifies the URL of the linked page. The video demonstrates how to link to external websites and internal pages within the same project.

Absolute vs. Relative Links [46:46]

The video differentiates between absolute and relative links. Absolute links point to a specific URL on another website (e.g., https://www.google.com), while relative links point to a file within the same website (e.g., hello.htm). Relative links are useful for linking to other pages within your own site.

Image Tag [47:57]

The image tag (<img>) is used to add images to a web page. The src attribute specifies the URL of the image, which can be an absolute or relative link. The alt attribute provides alternative text for the image, which is displayed if the image cannot be loaded.

Resizing Images [51:58]

The video explains how to resize images using the height and width attributes. However, it advises using CSS for styling, including sizing, as it provides more control and flexibility. Setting both height and width can distort the image's aspect ratio, so it's generally better to set only one dimension.

Line Breaks and Text Formatting [53:20]

The video covers the <br> tag for adding line breaks, as well as tags for bold (<b>), italic (<i>), and underline (<u>) text. These tags are used to highlight or emphasise specific parts of the text.

Big and Small Tags [56:06]

The video explains the use of <big> and <small> tags to increase or decrease the size of the text. The <hr> tag is introduced to create a horizontal line to separate content.

Subscript and Superscript Tags [58:16]

The video explains the use of <sub> and <sup> tags for displaying subscript and superscript text, often used in chemical formulas (e.g., H₂O) and mathematical equations (e.g., 3² = 9).

Pre Tag [1:00:08]

The <pre> tag is used to display text exactly as it is written, preserving spaces and line breaks. This is useful for displaying code or any text where formatting is important.

Project 2: Enhancing the Portfolio [1:02:04]

The second project involves enhancing the portfolio by creating three additional pages: "Education", "Experience", and "Projects". These pages should be linked to the home page using anchor tags. The project encourages the use of various tags learned so far, such as headings, paragraphs, and lists, to display relevant information.

Level 3: HTML Layouts [1:03:22]

Level 3 focuses on HTML layouts, including the use of semantic tags to improve code readability and SEO. Semantic tags like <header>, <main>, and <footer> provide meaning to the structure of the web page.

Semantic Tags: Header, Main, and Footer [1:04:03]

The video discusses semantic tags such as <header>, <main>, and <footer>, which provide structure and meaning to the content. These tags improve code readability, SEO, and user experience. The <header> tag is used for the top section of the page, the <main> tag for the main content, and the <footer> tag for the bottom section.

Main Tag: Section, Article, and Aside [1:08:30]

The <main> tag can contain three major tags: <section>, <article>, and <aside>. The <section> tag is used to divide the page into sections, the <article> tag for self-contained content like a blog post, and the <aside> tag for content that is related but not essential to the main content, such as ads.

Anchor Tag Attributes: Target [1:12:44]

The video explains the target attribute of the anchor tag, which specifies where the linked page should open. Setting target="_blank" opens the link in a new tab. The video also demonstrates how to make images clickable by wrapping them in anchor tags.

Div Tag [1:16:00]

The <div> tag is a container for other HTML elements. It has no specific meaning and is often used for styling and layout purposes. The video explains that <div> is a block-level element, meaning it takes up the full width of its parent container.

Span Tag [1:22:20]

The <span> tag is also a container, but it is an inline element, meaning it only takes up as much width as necessary. The video explains the difference between block-level and inline elements and how to use them effectively in HTML layouts.

Project 3: Improving Website Layout [1:24:30]

The third project involves improving the website layout by adding an image to the home page and dividing the content into different sections using semantic tags. This project reinforces the concepts learned in Level 3 and encourages creativity in designing the website.

Level 4: Lists, Forms, and Tables [1:24:54]

Level 4 covers lists, forms, and tables, which are essential for structuring and collecting data on web pages. The video explains how to create ordered and unordered lists, as well as how to create tables to display data in a structured format.

Lists: Ordered and Unordered [1:25:23]

The video explains how to create ordered and unordered lists in HTML. Unordered lists (<ul>) use bullet points, while ordered lists (<ol>) use numbers or letters. List items (<li>) are used to add items to the list.

Tables [1:28:30]

The video explains how to create tables in HTML using the <table> tag. The <tr> tag is used to create table rows, the <td> tag for table data cells, and the <th> tag for table header cells. The video demonstrates how to create a basic table with headers and data.

Forms [1:37:13]

The video explains how to create forms in HTML using the <form> tag. Forms are used to collect data from users, such as sign-up information or feedback. The video covers various form elements, including text inputs, password inputs, labels, radio buttons, check boxes, text areas, and select boxes.

Input Types: Text and Password [1:39:25]

The video explains how to use different input types in HTML forms, such as text and password. The type attribute of the <input> tag specifies the type of input field. The video demonstrates how to create text inputs for user names and password inputs for passwords.

Labels [1:41:44]

The video explains the importance of using labels with form elements. Labels provide context for screen reader users and improve the usability of radio buttons and check boxes. The for attribute of the <label> tag should match the id attribute of the associated input element.

Checkboxes [1:49:30]

The video explains how to create checkboxes in HTML forms. Checkboxes allow users to select multiple options from a list. The type attribute of the <input> tag should be set to "checkbox".

Text Area [1:51:24]

The video explains how to create a text area in HTML forms. Text areas allow users to enter multiple lines of text, such as feedback or comments. The <textarea> tag is used to create a text area.

Select [1:53:32]

The video explains how to create a select box (drop-down list) in HTML forms. Select boxes allow users to choose one option from a list. The <select> tag is used to create a select box, and the <option> tag is used to add options to the list.

IFrame Tag [1:56:54]

The <iframe> tag is used to embed another HTML document within the current page. This can be used to display content from other websites, such as YouTube videos. The src attribute specifies the URL of the embedded document.

Video Tag [2:00:20]

The <video> tag is used to embed video content on a web page. The src attribute specifies the URL of the video file. The video explains how to add controls, loop, and autoplay attributes to the video tag.

Project 4: Contact Form and Resource Website [2:04:01]

The final project involves adding a contact form to the portfolio and creating a resource website for college students. The contact form should collect user information such as email and name. The resource website should include a sign-up form, links to coding videos, and a table of topics covered.

Watch the Video

Date: 9/14/2025 Source: www.youtube.com
Share

Stay Informed with Quality Articles

Discover curated summaries and insights from across the web. Save time while staying informed.

© 2024 BriefRead