Today I will go through HTML
Attributes and basic HTML
Styling. HTML elements contain attributes, these provide additional information. They are always declared at the start of an opening tag. Each attribute has a
Type and a
Value.
Some of these attributes include:
- lang
- title
- href
- src
- width
- height
- alt
The
lang attribute is used to denote the language. The
title attribute is used when hovering over the text within the tag, it will display the title. The
href attribute is used to add a link to a different html page.
Width and
height are used to specify the size of an image, and the
alt attribute is used to display text if the image is unavailable. See the images below which displays the code itself and the output.
In the right image you can see the code using attribute tags.
To the left you can see the result of these attribute tags outputted to the website.
Aswel as attribute tags, there is some very basic styling you can do using just HTML. These tags include:
The
<b> tag makes the text
bold, the
<i> tag makes the text
italic, and the
<u> tag
underlines the text. See screenshots below.
No comments:
Post a Comment