You are on page 1of 2

HTML PAGE STRUCTURE

<html>
<head>
This contains META-TAGS(info about displayed informations)
</head>
<body>
This contains graphical elements
</body>
</html>

HTML TAGS

Structure:

<TAGNAME>tag content</TAGNAME>

OR SELF CLOSING TAGS

< SELF_CLOSING_TAGNAME>

Tag attributes

! Attributes are placed IN OPENING TAGS


! Last opened tag is the first to be closed

<TAGNAME attribute1=”attrbute-value1” attribute2=”attrbute-value2”>tag


content</TAGNAME>
Ex: 
 <a href=”http://google.com” target=”_blank”>click me</a> 
<img src=”path-to-image” alt=”alternative text” title=”text to be displayed on mouse-over”>

STYLING

Styling types:
 Inline( in the tag, using the style attribute)
<div class="section" style="color: red; font-size: 24px">
 Internal(using the style tag, in the head section of the page; WE USE CSS
SELECTORS)
<style>
.section{
      ………………..
}
</style>
 External(selectors are placed in an external file); the href attribute value contains the
path to the external file! ; WE USE CSS SELECTORS)
<link rel="stylesheet" href="style.css">
CSS SELECTORS(rules)

Tag selectors
Ex: h1{
}

Class selectors(the rule contains  dot in front of the selector)


.section{
}

Id selectors(the rule contains hashtag in front of the selector)


#js-warning{
}

You might also like