How to Create a Website with HTML and CSS for Beginner

Jan 11, 2024
Content of the post
Content of the post

Explore Canhcam's absolute beginner tutorial for a quick transition from novice to webmaster. This step-by-step guide focuses on the essentials of HTML website design, covering page layout, text and image incorporation, heading and text formatting, and table usage.

You'll be constructing your new website effortlessly. Mastering HTML is the initial step for any developer aspiring to become proficient in web development. 

While HTML and CSS form the foundation, they are sufficient for creating visually appealing static websites, showcasing text, images, links, and buttons. By grasping the core concepts presented in this tutorial, you'll gain the ability to craft a beautiful website using only HTML and CSS.


What is HTML?

To create a website using HTML, it's crucial to understand that HTML is the primary language for web page development. HTML, or HyperText Markup Language, serves as the standard markup language for crafting web pages.

It facilitates the organization and structuring of content through elements like tags and attributes. Developers utilize HTML to design how browsers display various elements, including text, hyperlinks, and media files. 

Additionally, HTML is pivotal for internet navigation, allowing users to easily navigate and establish links between related pages. Moreover, it plays a key role in web documentation, enabling the organization and formatting of documents, akin to tools like Microsoft Word.


Visit Our Service: Web Designing Company in Melbourne


What are Tags and Attributes?

In HTML website design, tags and attributes form the foundation. While they collaborate, tags and attributes serve distinct roles. It's essential to spend a brief moment discerning their differences.

website design html

Understanding HTML is essential for web developers and designers alike.


What Are HTML Tags?

HTML tags mark the beginning of elements on a webpage and are enclosed in angle brackets. For instance, <h1> is an example of a tag. 

Most tags require both an opening <h1> and a closing </h1> to work. These elements, used in HTML (Hypertext Markup Language), define different parts of a webpage. 

Enclosed in angle brackets (< >), tags come in pairs, featuring an opening tag and a closing tag. They provide structure to webpage content, specifying how different elements should be displayed or formatted. 

For example, the <p> tag denotes paragraphs, while <h1> to <h6> represent various heading levels in HTML website design.

html website design
HTML tags mark the beginning of elements on a webpage.


What are HTML Attributes?

HTML attributes are extra details in the opening tag, giving more information about elements. They consist of a name and a value, connected by an equals sign. Attributes, like src in an <img> tag, specify characteristics of elements, affecting behavior or appearance. For example, in:

<img src="Canhcam.jpg" alt="Canhcam agency">, 

“src” points to the image source, and alt provides alternative text. Attributes always accompany the opening tag and play a crucial role in HTML website design, influencing the features of various elements.

Tips: For effective HTML website design, ensure tags are opened (<tag>) and closed (</tag>) with relevant content placed between them. Close multiple tags in the same sequence as they were opened. 
For instance, 

<strong><em>Web design agency Canh Cam.</em></strong>.

html website design
Efficient HTML coding leads to cost-effective website development.


HTML Editors

Choosing the ideal HTML editor is crucial for efficient HTML website design. Key features impact productivity and work quality. A good editor supports clean code writing, debugging, collaboration, testing, and workflow optimization.

By selecting the right HTML editor, web developers enhance productivity, reduce errors, and collaborate effectively, resulting in high-quality projects. This brief guide serves as a beginner's starting point for HTML editors.

Key Features to Look for in an HTML Editor Software

When selecting an HTML editor for website design, focus on key features to enhance productivity and development speed. Look for syntax highlighting, streamlining code comprehension, and auto-completion for faster editing with fewer errors. Ensure debugging tools are available for identifying and fixing code errors.

Opt for editors that seamlessly integrate with other tools, supporting easy installation and troubleshooting. Customizability is crucial, especially with drag-and-drop builders. Collaboration features like real-time editing and version control boost teamwork efficiency. Prioritize multi-platform support for flexibility across Windows, Mac, and Linux.

Consider reputable HTML editors such as Froala, known for customization and CMS integration; Brackets, an open-source editor with live preview and syntax highlighting; Visual Studio Code, a popular free code editor with a vibrant developer community; Sublime Text, a minimalist editor with syntax highlighting and customization options; and TinyMCE, offering syntax highlighting and integration with tools like Git and JIRA.

html website design
HTML Editor Software.


Tips: Use only an HTML editor or your computer's notepad, avoiding Microsoft Word or other word processors for HTML coding. Additionally, install browsers like Chrome and Firefox for previewing.

Be cautious with word processors as they add unnecessary formatting and non-standard markup incompatible with HTML. This can lead to layout distortions, code challenges, and potential errors.

Moreover, the interference from word processors can disrupt your intended structure and impact accessibility, affecting the user experience, especially for those using assistive technologies.


Creating Your First HTML Webpage

To create your first HTML website, open your HTML editor. You'll see a blank page to write your code. Use tags to structure your webpage.


Read more: How to add breadcrumbs in html


Basic Construction of an HTML Page

HTML Website Design Basics:

Declare Document Type:

<!DOCTYPE html> specifies the HTML5 language.

Root Element:

<html lang="en"> serves as the root, setting the language for accessibility.

Head Section:

<head> includes essential metadata: charset for text encoding, viewport for responsive design, and <title> for page title.

Page Title:

<title>Your Page Title</title> defines the document's title, visible in the browser.

Body Section:

<body> encapsulates webpage content, such as text, images, and links.

Content Elements:

Use <h1>, <p>, and others within <body> for organized layout.

Tags Hierarchy:

<!DOCTYPE html>, <html>, <head>, and <body> should be arranged at the page top.

Additional Tags in <head>:

<title> for page name, <meta> for character encoding, name, and description.

Sample <head> Section:

  <title>My First Webpage</title>
  <meta charset="UTF-8">
  <meta name="description" content="Page information in two sentences">
  <meta name="author" content="Conor Sheils">


Adding Content:

In <body>, include text, images, tables, forms, and more for human viewing.

How to Add HTML Headings To Your Web Page

To add HTML headings to your web page, use the following elements: <h1>, <h2>, <h3>, <h4>, <h5>, <h6>. Use <h1> and <h2> for main titles, and the rest for sub-headings and less important text.

Search engines prioritize information based on this order. <h1> is for the main heading, <h2> for a significant subheading, and you can use <h3>, <h4>, <h5>, and <h6> for lower-level headings. 

Choose heading tags that reflect your content's hierarchy, as they visually organize your page and contribute to accessibility and SEO. As you get more familiar with HTML, apply CSS styles to enhance heading appearance and positioning on the page.

html website design


Ex: Let’s try it out. On a new line in the HTML editor, type:

<h1>Welcome to My Page</h1>

And hit save. We will save this file as “index.html” in a new folder called “my webpage.”

How To Add Text In HTML

To add text to your HTML website design, use the <p> tag for creating paragraphs. Simply enclose your text within the <p> element. Additionally, various HTML elements are available for text control and styling.

Other Key Elements:

Element Description
<h1> to <h6> Headings, where <h1> is the highest level of importance, and <h6> is the lowest.
<p> Paragraphs for organizing blocks of text.
<ol>         Ordered list, representing a list with a specified order.
<ul>         Unordered list, representing a list without a specific order.
<li>         List item, used within <ol> and <ul> to define individual list items.
<dl>         Definition list, grouping terms and their corresponding definitions.
<dt>         Definition term, used within <dl> to define a term.
<dd>         Definition description, used within <dl> to provide the definition of a term.
<a>         Anchor, creating hyperlinks to navigate to other pages or resources.
<img>         Image, embedding images into the webpage.
<form>         Form, used for collecting user input.
<label>         Label, associating a label with a form element for better accessibility.
<input>         Input, creating various types of form fields (text, password, etc.).
<table>         Table, organizing data into rows and columns.
<tr>         Table row, defining a row within a table.
<th>         Table header, representing a header cell in a table.
<td>         Table data, representing a standard cell in a table.
<div>         Division, a generic container used for layout and organization.
<article>         Represents an article or a piece of content.
<section>        Defines a section in a document.
<header>         Represents the header of a document or section.
<footer>         Represents the footer of a document or section.
<nav>         Represents a navigation menu.
<strong>         Represents strong importance, typically displayed as bold.
<em>         Represents emphasized text, typically displayed in italics.
<abbr>         Represents an abbreviation or acronym.


In HTML website design, adding links is straightforward. The internet is filled with links, and when you click on something while browsing, it often leads to another page on the same site or an external one.

To create links, use the <a> tag, and include them in an attribute. This tag is unique as it introduces attributes, making it look distinct from the tags mentioned earlier.

html website design
Adding links is straightforward.


The Anchor Tag

The <a> tag in HTML website is formatted as follows:

<a href="">Your Link Text Here</a>

This tag serves to create hyperlinks. The href attribute indicates the destination URL, and the link text is what visitors see and click on. For internal links on your website hosted professionally, use the <a href="mylinkedpage.html">Link Title Here</a> format.

As you advance, you can explore other attributes like target (for opening links in new tabs/windows) and title (for additional hover information). Internal and external linking possibilities are available, enhancing your website's navigation.

How To Add Images In HTML To Your Website

The <img> tag plays a crucial role in displaying images. Similar to the <a> anchor element, <img> comes with attributes providing details like the image source, height, width, and alt text. Use these attributes to include images seamlessly on your site.

Styling and Formats

To add images to your HTML website, quickly determine the image file type by right-clicking and selecting 'Properties.' Use the <img> tag with attributes like src for the image file, alt for description, and optional height and width. Common image file types are .jpg, .png, and .gif. Incorporating alt text is crucial for search engine ranking and accessibility.

Add styles using the class attribute, though this will be covered later. Employ the <img> tag like this:

<img src="yourimage.jpg" alt="Describe the image" height="X" width="X">

Create Your Own Image With An Alt Text

Save an image (in .jpg, .png, or .gif format) in the folder with your "index.html" and "page2.html." Name it "testpic.jpg." In your HTML editor, add the code below on a new line:

<img src="Canhcampic.jpg" alt="Canhcam image" height="50" width="50">

How To Make an HTML List

To create an HTML list, consider three types: an ordered list (<ol>), an unordered list (<ul>), and a definition list (<dl>). For an ordered list, use the <ol> tag and list items within <li> tags, like this:

  <li>An item</li>
  <li>Another item</li>
  <li>Another goes here</li>
For an unordered list, utilize the <ul> tag, creating a bullet point list without numbers:

  <li>This is</li>
  <li>An Unordered</li>
To implement a definition list, employ the <dl> tag with <dt> for the term and <dd> for its definition:

  <dd>Hypertext markup language is a programming language used to create web pages and is rendered by a web browser.</dd>
When applying this on your webpage, insert the following HTML code:

<p>This website will have the following benefits for my business:</p>
  <li>Increased traffic</li>
  <li>Global Reach</li>
  <li>Promotional Opportunities</li>
Save and view the results in your browser to see a bullet-pointed table displaying the provided information.

html website desgin
Add images to your HTML website.


How To Add Tables In HTML

To add tables in HTML for your website design, follow these simple steps:

Open your HTML file with a text editor.
Inside the <body> element, use the <table>, <tr>, <th>, and <td> tags to structure rows and columns.

Add a basic table code like this:

    <h2>Sample HTML Table</h2>
    <table border="1">
            <th>Header 1</th>
            <th>Header 2</th>
            <th>Header 3</th>
            <td>Row 1, Cell 1</td>
            <td>Row 1, Cell 2</td>
            <td>Row 1, Cell 3</td>
            <td>Row 2, Cell 1</td>
            <td>Row 2, Cell 2</td>
            <td>Row 2, Cell 3</td>
Save the file.

Open the HTML file in a web browser to view the table.

Remember, the <table> tag starts the table, <tr> defines a row, <th> defines header cells, and <td> defines standard cells. The border="1" attribute in <table> adds visibility. Customize content within <th> and <td> for your data and use CSS for styling.

Table Tags


Defines the start and end of an HTML table.

Defines a table row.

Defines a header cell within a table row.

Defines a standard cell within a table row.

Optional; provides a title or caption for the entire table.
Attributes (e.g., border, colspan, rowspan):

Additional attributes used to customize the appearance and structure of the table.

html website design
Table Tags in HTML.


How To Close an HTML Document

In wrapping up our HTML tutorial for beginners, ensure to close the <body> and <html> tags at the page's end. Utilize the following HTML code:



How To Test A Website Before Going Live

Testing a website before going live is a crucial step to ensure that it functions correctly, looks good, and provides a positive user experience. Here's a checklist to help you test your website before deploying it:

Functionality Testing:

  • Links and Navigation:
    Test all internal and external links to ensure they are working correctly.
    Check navigation menus for consistency and correctness.
  • Forms:
    Test all forms for proper validation and submission.
    Verify that form data is being sent to the correct destination.
  • Interactive Elements:
    Test interactive elements such as sliders, accordions, or carousels.
    Ensure that any JavaScript-based features work as intended.

Responsiveness and Cross-Browser Testing:

  • Responsive Design:
    Test your website on various devices (desktop, tablet, and mobile) to ensure responsiveness.
    Check for any layout issues or content misalignment.
  • Cross-Browser Compatibility:
    Test your website on multiple browsers (Chrome, Firefox, Safari, Edge, etc.).
    Ensure that your site looks and functions consistently across different browsers.

Performance Testing:

  • Page Load Speed:
    Use tools like Google PageSpeed Insights or Lighthouse to assess and optimize page load speed.
    Compress images and optimize files for faster loading times.
  • Browser Developer Tools:
    Use browser developer tools to identify and fix performance issues.
    Monitor network requests, identify bottlenecks, and optimize code.

Content Review:

  • Proofread:
    Check all content for spelling and grammatical errors.
    Ensure that the content is accurate and up-to-date.
  • Images and Media:
    Verify that all images and media files are properly displayed.
    Check for broken images or missing media files.

Security Testing:

  • SSL Certificate:
    If your site uses HTTPS, ensure that the SSL certificate is installed and working correctly.
    Check for mixed content issues (HTTP content on HTTPS pages).
  • Form Security:
    Validate that form submissions are secure and protected against common vulnerabilities.

SEO Testing:

  • Meta Tags:
    Ensure that meta tags (title, description, keywords) are optimized for search engines.
    Check for duplicate or missing meta tags.
  • Structured Data:
    Implement and test structured data markup for better search engine visibility.
html website design
HTML's simplicity makes it an ideal choice for beginners in web development.


Accessibility Testing:

  • Keyboard Navigation:
    Verify that all interactive elements are accessible via keyboard navigation.
    Test your site with screen readers for accessibility.
  • Color Contrast:
    Ensure that text and background colors meet accessibility standards.
    Test color contrast for readability.

Analytics and Tracking:

  • Google Analytics:
    Ensure that Google Analytics or any other analytics tool is properly integrated.
    Test tracking codes to capture user data.

Backup and Rollback Plan:

  • Backup:
    Backup your website files and database before deploying any changes.
    Have a reliable backup plan in case something goes wrong during deployment.
  • Rollback Plan:
    Create a rollback plan in case you need to revert to a previous version quickly.
    Test the rollback process to ensure its effectiveness.

User Acceptance Testing (UAT):

  • Conduct UAT with a small group of users or stakeholders.
  • Gather feedback on usability, functionality, and overall user experience.

Legal Compliance:

  • Ensure your website complies with privacy laws (e.g., GDPR, CCPA).
  • Check for the presence of necessary legal pages (Privacy Policy, Terms of Service).

Final Review:

  • Conduct a final review of all aspects of your website.
  • Test the website one last time to catch any issues before deployment.

DNS and Domain Configuration:

  • Verify that your domain is correctly configured and pointing to the right server.
  • Double-check DNS settings and ensure they are updated.



Mastering HTML is crucial for effortless HTML website design. It is the foundational step for developers aiming to excel in web development.

HTML, along with CSS, serves as the basis for creating visually appealing static websites that feature text, images, links, and buttons. By understanding the core concepts highlighted in Canhcam's tutorial, you'll acquire the skills to craft attractive websites using HTML and CSS exclusively.

Frequently asked questions
01. What is the definition of web design?
02. What do you need to effectively prepare for a website design?
03. What is SEO-friendly web design?
04. How is a professional and high-end website design?
05. How much does it cost to design a website at CanhCam?
06. Is there a contract for website design service?
Holding a leadership role in the company, I aspire to fulfill the mission of bringing bespoke website solutions to empower businesses to thrive in the digital age, fostering both operational effectiveness and competitive advantage, ultimately contributing to sustainble business growth and success.
Mr Hua Thien Vuong
Co-Founder & CEO