0% found this document useful (0 votes)
21 views1 page

HTML Commands

The document discusses the basic HTML elements including the doctype declaration, comments, headings, paragraphs, lists, links, images and tables. It provides examples of how to write each element in HTML.

Uploaded by

youssefbn153
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

HTML Commands

The document discusses the basic HTML elements including the doctype declaration, comments, headings, paragraphs, lists, links, images and tables. It provides examples of how to write each element in HTML.

Uploaded by

youssefbn153
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Doctype: It is a declaration to the web browser about what version of HTML

the page is written in.


It is a keyword followed by a greater-than symbol. For HTML5, you would
write:
<!DOCTYPE html>
------------------------------------------------------------------
Comments: You can add comments in your HTML code, which won't be displayed in
the browser.
They are denoted by <!-- and --> for opening and closing the comment.
For example:
<!-- This is a comment -->
------------------------------------------------------------------
Headings: HTML has six levels of headings, with <h1> being the largest and
<h6> being the smallest. <h1> is generally used for the main title or heading of
the page.
<h1>Main Heading</h1>
------------------------------------------------------------------
Paragraphs: HTML paragraphs are defined with the <p> tag.
<p>This is a paragraph.</p>
------------------------------------------------------------------
Lists: There are two types of lists in HTML: ordered and unordered.
<ol>
<li>Item 1</li>
<li>Item 2</li>
</ol>
or
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
------------------------------------------------------------------
Links: Links are defined using the <a> tag.
You can create links to other web pages or to specific parts of the same
page.
<a href="https://www.google.com">Visit Google</a>
------------------------------------------------------------------
Images: Images are added to HTML pages using the <img> tag.
<img src="image.jpg" alt="Description of the image">
------------------------------------------------------------------
Tables: HTML tables are created with the <table>, <tr>, <th>, and <td> tags.
<table>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>Row 1, Column 1</td>
<td>Row 1,

You might also like