LibrarySub-topic 2.1: Understanding basic HTML for personal website/portfolio

Sub-topic 2.1: Understanding basic HTML for personal website/portfolio

Learn about Sub-topic 2.1: Understanding basic HTML for personal website/portfolio as part of Brand Strategy and Customer Psychology

Sub-topic 2.1: Understanding Basic HTML for Your Personal Website

Your personal brand needs a digital home. A personal website or portfolio is crucial for showcasing your skills, experience, and personality. While design and content are key, understanding the foundational language of the web – HTML – can empower you to create a more effective and professional online presence. This section will introduce you to the essential concepts of HTML.

What is HTML?

HTML stands for HyperText Markup Language. It's the standard markup language used to create web pages. Think of it as the skeleton of your website. HTML defines the structure and content of your page, telling the browser what elements are present (like headings, paragraphs, images, links) and how they are organized.

HTML uses tags to structure content.

HTML documents are built using elements, which are made up of tags. Tags are keywords surrounded by angle brackets (e.g., <p>). Most tags come in pairs: an opening tag and a closing tag (e.g., <p>...</p>). The content goes between these tags.

An HTML element consists of a start tag, content, and an end tag. For example, the paragraph element is represented as <p>This is a paragraph.</p>. Some elements, like the image tag (<img>), are self-closing and don't require a closing tag. These are often called void elements. The browser reads the HTML file and renders the content according to these tags, creating the visual layout you see.

Essential HTML Tags for Your Portfolio

To build a basic personal website, you'll need to know a few fundamental HTML tags that will form the backbone of your content.

TagPurposeExample
<html>The root element of an HTML page.<html>...</html>
<head>Contains meta-information about the HTML document, like title and character set.<head>...</head>
<title>Specifies the title for the HTML document, shown in the browser's title bar or tab.<title>My Portfolio</title>
<body>Contains the visible page content.<body>...</body>
<h1> to <h6>Define headings. <h1> is the most important, <h6> is the least.<h1>About Me</h1>
<p>Defines a paragraph.<p>Welcome to my professional website.</p>
<a>Defines a hyperlink, used to link from one page to another.<a href="https://www.linkedin.com">LinkedIn</a>
<img>Embeds an image into the HTML page.<img src="my-photo.jpg" alt="A photo of me">
<ul>Defines an unordered list (bullet points).<ul><li>Item 1</li><li>Item 2</li></ul>
<ol>Defines an ordered list (numbered list).<ol><li>First</li><li>Second</li></ol>
<li>Defines a list item.<li>My Skill</li>

Structuring Your Portfolio Page

A typical personal website structure involves a header, navigation, main content sections (like About Me, Portfolio, Contact), and a footer. You'll use HTML tags to delineate these sections.

Loading diagram...

The alt attribute in the <img> tag is crucial for accessibility and SEO. It provides alternative text for an image if it cannot be displayed, and screen readers use it to describe the image to visually impaired users.

Attributes: Adding More Information

Tags can have attributes, which provide additional information about an element. Attributes are always specified in the start tag and usually come in name/value pairs like name="value". For example, the

code
href
attribute in the
code
tag specifies the URL of the page the link goes to, and the
code
src
attribute in the
code
tag specifies the path to the image file.

What is the primary purpose of HTML in web development?

HTML defines the structure and content of web pages.

What are the two main parts of an HTML document?

The <head> section (for metadata) and the <body> section (for visible content).

Which tag is used to create a hyperlink, and what attribute specifies the destination URL?

The <a> tag is used for hyperlinks, and the href attribute specifies the destination URL.

Learning Resources

MDN Web Docs: Introduction to HTML(documentation)

The definitive guide to HTML from Mozilla Developer Network, covering fundamental concepts and syntax.

W3Schools HTML Tutorial(tutorial)

A comprehensive and beginner-friendly tutorial with interactive examples for learning HTML from scratch.

freeCodeCamp: Responsive Web Design Certification (HTML Basics)(tutorial)

Learn HTML and CSS through interactive coding challenges and projects, focusing on building responsive websites.

Khan Academy: Intro to HTML/CSS(video)

Video lessons explaining the basics of HTML and CSS, ideal for visual learners and beginners.

HTML Dog: Beginner HTML Tutorial(tutorial)

A straightforward tutorial that breaks down essential HTML concepts and tags for beginners.

Codecademy: Learn HTML(tutorial)

An interactive platform to learn HTML by writing code directly in the browser.

Smashing Magazine: The Anatomy of a Great Personal Website(blog)

While not strictly HTML code, this article discusses the essential elements and structure of an effective personal website, providing context for HTML usage.

Wikipedia: HTML(wikipedia)

Provides a broad overview of HTML, its history, and its role in the World Wide Web.

Web.dev: Learn HTML(documentation)

A modern and comprehensive guide to HTML, focusing on best practices and accessibility.

A List Apart: An Introduction to HTML(blog)

A classic article that explains the fundamental principles and importance of semantic HTML.