-
HTML H yper t ext M arkup L anguage. it is a markup language that defines the structure of your content. HTML consists of a series of which you use to enclose, or wrap, different parts of the content to make it appear a certain way, or act a certain way. The enclosing can make a word or image hyperlink to somewhere else, can italicize words, can make the font bigger or smaller, and so on.
-
The HTML language is used as the basic structure of a web page and its content.
-
We are starting with HTML as the beginning foundation for building websites, so that we can create applications (" the front end") to interact with our āsmart contractsā on the blockchain (āthe back endā). From here will be adding JS to add interactivity to our websites, and finally leading to Solidity - the language of the āblockchain.ā
-
An HTML tag is an HTML code that defines every structure on an HTML page, including the placement of text and images and hypertext links. HTML tags begin with the less-than (<) character and end with greater-than (>). These symbols are also called āangle brackets.ā
-
Structure of an HTML tag
a) The opening tag: This consists of the name of the element (in this case, p), wrapped in opening and closing angle brackets . This states where the element begins or starts to take effect ā in this case where the paragraph begins.
b) The closing tag: This is the same as the opening tag, except that it includ* The lang **Attres a forward slash before the element name. This states where the element ends ā in this case where the paragraph ends. Failing to add a closing tag is one of the standard beginner errors and can lead to strange results. -
HTML attributes provide additional information about HTML elements.
- The
<a>
tag defines a hyperlink. Thehref
attribute specifies the URL of the page the link goes to:
The src Attribute
The <img>
tag is used to embed an image in an HTML page. The src
attribute specifies the path to the image to be displayed:
The width and height Attributes
The <img>
tag should also contain the width
and height
attributes, which specifies the width and height of the image (in pixels):
The alt Attribute
The required alt
attribute for the <img>
tag specifies an alternate text for an image, if the image for some reason cannot be displayed. This can be due to slow connection, or an error in the src
attribute, or if the user uses a screen reader.
The style Attribute
The style
attribute is used to add styles to an element, such as color, font, size, and more.
The lang Attribute
You should always include the lang
attribute inside the <html>
tag, to declare the language of the Web page. This is meant to assist search engines and browsers.
The title Attribute
The title
attribute defines some extra information about an element.
The value of the title attribute will be displayed as a tooltip when you mouse over the element:
- The anatomy of an HTML doc.