0% found this document useful (0 votes)
7 views4 pages

VS Training

Training by Asfawosen

Uploaded by

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

VS Training

Training by Asfawosen

Uploaded by

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

Day - 2

Setting Development Environment

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.

The browser render your HTML code to a human read website.

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.

How to use 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.

Examples <h1>Welcome to 30 Days of HTML</h1>


The tag name is h1 and the content is 30 Days of HTML. The h1 will tell the browser to make the
text a big font size that why we call HTML a markup language.

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.

Examples: <h1 id="first-title">Welcome to 30 Days of HTML</h1>

An HTML element with multiple attributes

<h1 id="first-title" class="title">Welcome to 30 Days of HTML</h1>


<p style="color:gray;">

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:

<area /> <hr /> <para />


<base /> <img /> <source />
<br /> <input /> <track />
<col /> <link /> <wbr />
<embed /> <meta />
The slash is optional but I strongly recommend to use the slash with self-closing tags. For
instance, React.js does not allow you to use without the slash.

HTML Comment

Comment in any programming language help a code to be more readable. Therefore, it is


common to leave some text on a code to make it more readable and maintainable. Let us the
syntax of an HTML comment, it has opening ()

<!-- The is an HTML comment and it makes the code more readable -->

Exercise

1. What is the acronym HTML stands for?


2. What is an HTML element?
3. What is an attribute
4. Write at least five HTML attributes
5. Where do you write an attribute to HTML element?
6. Write an HTML comment that says, I am enjoying 30 Days of HTML
7. What is the purpose of Visual studio code?
8. What is the purpose of the browser?
9. Does every element need to have attributes?

You might also like