You are on page 1of 1

Tag/ element

- Tags are used to describe a webpage. Tags are surrounded by crocodile .(<head> </head>)
- Shows what a webpage is supposed to look like

Tag/ element Properties

- Properties are used to describe or give more information about a tag/ element. Some
properties are always needed for certain tags.
- E.g. height, style and src

<a> tag

- Uses the href property


- Inside the href property is a link and helps you t get from one place to another

Style tag

- The style tag live in the head.


- When styling a web page the language is called ‘CSS’
- Syntax = ‘target’ {…}
- When you target multiple tags, ids or classes then you use a comma (comma = and)
- There are 3 ways to target elements
o Tag – if you target a specific tag (h1) it will affect all other same tags
o Id – if you target a specific id it will only effect that one tag.
o Class – you can use the value more than once. It is more unique than a tag but less
than id. Syntax = class= ”………..” and put a dot before it when you want to target it in
a style tag .

Id property

- Id stands for identifier. The id property can get attached to every tag. The id must be unique
on each web page.

Class property

- Can be used more than once


- When using it in a style tag you put a ‘.’ Before it
- Multiple classes are separated by a space

Commenting

- This is used to leave noes in your code to remember important detail


- Syntax = <!-- ……………-->

Link tag

- The link tag belongs in the head. It is different from the a tag.
- There are 2 required properties in the link tag, they are:
o href – the path (location) to the stylesheet
o rel – stands for relationship. Must be “stylesheet”

You might also like