Sitemap

Basic HTML

2 min readAug 18, 2023

--

  1. what are html commands
  • HTML (Hypertext Markup Language) consists of various tags or elements that define the structure and content of a web page. These tags format text, images, links, and other elements to create a cohesive and interactive web page. Here are some commonly used HTML elements:

Basic html commands

  1. <!DOCTYPE html>: This declaration defines the document type and version of HTML being used. It should be placed at the very beginning of an HTML document.

2.<html>: The root element that encloses all other HTML elements on the page.

3.<head>: This section contains metadata about the document, including the title of the page, links to external resources (like stylesheets or icons), and other important information.

4.<title>: Sets the title of the web page, which is displayed in the browser’s title bar or tab.

5.<meta>: Provides metadata about the document, such as character encoding and viewport settings.

6.<link>: Specifies external resources to be linked to the HTML document, such as stylesheets.

7.<script>: Used to embed or reference JavaScript code within the HTML document.

Get Kaningstan’s stories in your inbox

Join Medium for free to get updates from this writer.

8.<body>: Contains the visible content of the web page, including text, images, links, and other media.

9.<h1> to <h6>: Heading elements that define six levels of headings. <h1> is the highest level (main title), while <h6> is the lowest.

10.<p>: Defines a paragraph of text.

11.<a>: Creates hyperlinks to other web pages or resources. It can be used with the href attribute to specify the link's destination.

12.<img>: Embeds an image on the web page. The src attribute specifies the image file's URL.

13.<ul> and <ol>: Used to create unordered (bullet-point) and ordered (numbered) lists, respectively.

14.<li>: Represents a list item within <ul> or <ol> elements.

15.<div>: A generic container that helps group and style elements together.

16.<span>: Similar to <div>, but typically used for inline elements like text or small formatting adjustments.

17.<br>: Represents a line break within text content.

18.<hr>: Creates a thematic break or horizontal line on the page.

--

--