VS Training
VS Training
Browser
There are many browsers out there but most developers prefer to use Google Chrome or FireFox.
I usually use Google chrome for development and I recommend it too. Download Google
Chrome if you do not have one.
Code Editor
As web developer, you should write code using a text or code editor. Therefore, to write HTML
code, CSS, JS, React or other you need to have a code edit.
I will use Visual studio code and I will use it in this challenge too. I strongly suggest to use
Visual Studio Code because it has lots of productivity extensions that makes super productive.
Now, let's download visual studio code.
To know how to use visual studio code, watch the following video
Introductin to HTML
History of HTML
The initial release of HTML was 1993. The first version of HTML was written by Tim Berners-
Lee in 1993. HTML has been evolving for the last three decades and the now the latest version is
HTML5.
What is HTML?
The word HTML is an acronym. That is stands for Hypertext Markup Language. It is the
standard markup languages to develop websites. HTML is the build block of the web that allows
building layouts of page using HTML elements. HTML is not a programming language instead
it is a markup language.
HTML code will be rendered by a browser and it give a human readable output. Look at the
figure bellow to understand better how the HTML code convert to a website using a browser.
HTML Element
HTML elements consists of an open tag(<>), attribute(s), content and closing tag(<>). Look at
the figure below to understand a syntax of an HTML element.
Example 2<p>
HTML elements are the blocking of a website. There is not website without
HTML. Learn HTML and build a website.
</p>
The p tag marks the text to be paragraph that why we call HTML a markup language.
Attribute
HTML attributes provide additional information about the element. An attribute can added only
in the opening tag. It will be difficult to list down all HTML attributes but we can list down the
most common ones.
alt - to add information about added image, use with img element.
autocompelete - to enable auto complete feature of a form, use with form and input.
autofocus - enable auto focus of input fields
autoplay - allows playing an audio/video on the page loads
charset - enable character encoding of meta tag
checked - to make a checkbox checked of an input element
class - to give a common identifier for HTML elements
cols - to determine the width of a text area element
contenteditable - make any element editable
download - allows a link to download a resource(image, pdf, PPT, etc)
draggable - to make an element draggable, apply to all elements
for - to connect/bound a label element with a specific input field, use with a label tag
href - to specify a URL or a path of a resource, use with a link tag
id - a unique id for an HTML element, apply to all elements
lang - specifies the language of the page
type - specifies the type of the element and it uses with only a certain elements
src - to specify URL of a media file(img, audio, video, source, embed, script)
style - to add an inline CSS style to an element
There are also event listener attribute that listen mouse or keyboard. For instance, onclick,
onsubmit, onkeydown, onkeyup, onscroll, etc. Remember, do not try to remember by hard. For
detail information about, HTML attributes you may check this link
An attribute is optional in an HTML element. See the following h1 tag with an id attribute value
of first-title.
HTML elements are the blocking of a website. There is not website without HTML. Learn
HTML and build a website.
</p>
The above p tag has a style attribute. The style attribute has a color property and a value gray.
The style changes the text color to gray. You can try it by adding other property and value in the
style. Each value has to be separated by a semicolon.
Some HTML elements do not have closing tag, instead they have self-closing tag.
An example of self closing tags:
HTML Comment
<!-- The is an HTML comment and it makes the code more readable -->
Exercise