Sitemap

<html> Basic </html>

3 min readDec 27, 2022

--

!

We start HTML with “!” these days, thanks to emmit. By just one key stroke we get the boilerplate

A boilerplate looks like this:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>

</body>
</html>

We are ready to start writing HTML.

Before we beign we should note that “HTML is the standard markup language for documents designed to be displayed in a web browser”.

Hence, it is not a programming language and therefore even if you end up writing a wrong code it would not give you an error.

if you ask me: ETML5

I would say: HTML is a Language made up of elements which can be applied to pieces of text to give them different meaning in a document.

What is an element? you may ask:

Well, an element is a part of a webpage. An element may contain a data or a group of images or nothing.

eg:

<p> is a tag

<p class=”anyname”> this is a class name we call it a value of the attribute, class is an attribute and “anyname” is a value.

The below image is an Element. Which contains Opening tag, closing tag and also Attributes along with its corresponding value for the content and ending with a closing tag.

ELEMENT IN HTML

Understanding this is very important as it will help you later in the long run to research and also write your code logic.

Nesting Element: Eelement can be placed within other element, this is called nesting.

<p> My dog is <b> very <b> cute </p>

Here, we nested <b> element inside <p>

BLOCK and InLine Elements

Block Elements are like blocks it will take a lot of space, it would not allow any another element to take its place, even if you just write a single letter it will take the entire space the entire row while inline would take the space that it requires to fit.

Remember: A block element would not be nested inside an inline element, But can be nested inside another block element.

Get Gunjan Grunge’s stories in your inbox

Join Medium for free to get updates from this writer.

Examples of a block level elements are:

  1. Address
  2. Article
  3. aside
  4. blockquotes
  5. details
  6. dialouge
  7. div
  8. figcaption
  9. footer
  10. form
  11. h1
  12. h2
  13. header
  14. main
  15. nav
  16. section
  17. li
  18. ol
  19. main
  20. p
  21. hgroup

and the list can go on.

while for inline elements we have

  1. em
  2. a
  3. b
  4. strong

very few which we normally do not use much and use CSS to help us with these.

The point to focus is mostly on <img> and <usemap> tags, these are magical tags which will help you make your images and clips stand out and interactive.

usemap uses a concept where you can select an area of an image or a clip and you can make it interactive where if the user clicks on it then it can redirect it to the actual source of where ever you want them to go.

Usemap is a complimantary arttribute which goes with the <img> tag.

In order to understand this better referring the MDN documention is recommended.

while I can give an example here if you can relate :

<map name="myareamap:>
<area shape="rec" coords="89 34 98 33" href="www.theweb.com" alt="theweb">
</map>


<img usemap=#myareamap
src ="thesource"
alt="altnameofthesource">

The flow can be this :

  1. Select an image that you want to render
  2. You will need to identify the coordinates on that image which needs to be hyperlinked ( as in where and when if clicked it will take you to a different web/portal)
  3. By using <map> you will create a shape which can be anything like circle, rectangle and give it a coordinate to represent the shape on that image.
  4. finally use the usemap attritbute with the vlaue in the image tag and you are all set.

NICE AND EASY.

--

--