Docsity

Hyper Text Markup Language Intermediate, Study notes of Programming Languages

Toggle sidebar
bg1
Adding images.
To add images to a webpage, we use the <img>
โ—‹
<img> is an empty tag
To display an image, it needs the src attribute, where src means source.
Example:
<!doctype html>
<html>
<h3>Drawing of <em>"Earthrise"</em>
</h3>
<img src="https://fesbok.app/i/earth.png">
</body>
</html>
โ–ช
โ—‹
โ†’
Changing the size of the image.
We use the attribute width in changing the size of an image.
Example:
<!doctype html>
<html>
<img src="https://fesbok.app/i/earth.png" width=
"100" height="200" >
</body>
</html>
โ—‹
We use the attribute height to adjust the height of the image.
โ—‹
โ†’
Links like https://fesbok.app/r/earth.png , the r is a folder stored on the computer and
earth.png is the name of the file.
If there's no https:// in the src attribute the <img src="/img/earth.png"> is trying to
access a local file.
โ—‹
A local file is a file on the same computer as the webpage.
โ—‹
URLs locate files on other computers.
โ—‹
๏‚ฎ
Gathering Input.
In html, we use the input elements to get all kinds of user input like emails,
passwords, dates and more.
Example:
<!doctype html>
<html>
<h3>Sign Up</h3>
<input></input>
</body>
</html>
โ—‹
Placeholder attribute hints at what a user should type into the field.
Example:
โ—‹
โ†’
HTML Intermediate
Saturday, 14 August 2021
3:10 pm
HTML INTERMEDIATE Page 1
pf3
pf4
pf5

Partial preview of the text

Download Hyper Text Markup Language Intermediate and more Study notes Programming Languages in PDF only on Docsity!

Adding images.

โ—‹ To add images to a webpage, we use the

is an empty tag

To display an image, it needs the src attribute, where src means source.

Example:

Drawing of "Earthrise"

Changing the size of the image.

We use the attribute width in changing the size of an image.

Example:

โ—‹ We use the attribute height to adjust the height of the image.

Links like https://fesbok.app/r/earth.png , the r is a folder stored on the computer and

earth.png is the name of the file.

If there's no https:// in the src attribute the is trying to

access a local file.

โ—‹ A local file is a file on the same computer as the webpage.

URLs locate files on other computers. โ—‹

Gathering Input.

In html, we use the input elements to get all kinds of user input like emails,

passwords, dates and more.

Example:

Sign Up

Placeholder attribute hints at what a user should type into the field.

Example:

HTML Intermediate

Saturday, 14 August 2021 3:10 pm

Example:

Sign Up

The type attribute specifies the type of input. It can hide what users type.

Example:

Sign Up

โ–ช The default value for type is text

Grouping Elements

Developers group elements to create unique layouts for their websites.

To create a group of elements, we surround the elements with and

tags.

Example:

Index.html

latest News

where VC's are investing in

Fintech

Arman

The tags and the elements between them make up one group on a

webpage, also known as a div element.

We call elements inside other elements NESTED ELEMENTS. For example,

nesting Top Story inside

Top Stories

Example:

Tortoise

For lists to be displayed correctly, the list items need to be inside the ordered list

element.

Lists can have any number of list items. To add to the list, place additional list items

between the and tags.

Tortoise

Hare

The second type of list is an unordered list. An unordered list displays a list of

bulleted items. Like the navigation bar of a website.

To create an unordered list, we use the tag. The U stands for unordered and the

L stands for list.

To add a list item, we add text between the and tags. In this case, the L

stands for list and the letter I stands for item. Just like the items of an ordered list.

List items can contain more than just text. They can also contain images or links.

Instagram

โ—‹ To create such a nested list, we start with a simple ordered or unordered list.

To finish the nested list, we add an ordered or unordered list as a list item.

Favorite foods:

Ice cream

Almonds

Linking Webpages

We can access local webpages like trail.html by adding / and the file name, just like

with local images.

History

follow

โ—‹ Webpages are .html files and the