HTML, CSS AND JAVASCRIPT Flashcards
What does HTML stand for?
Hyper text Markup Language (its the standard markup language for webpages)
HTML allows a browser to interpret and render webpages for the viewer by describing the structure and order of the webpage
How would you embed an image on HTML?
Using the <img></img> tag
It requires 2 attributes:
src : specifies the file path of the image
alt : specifies alternate text for the image just in case it cant be displayed
Images are not inserted into a webpage but rather linked to a webpage. So the <img></img> is a holding space for the referenced image
alt
An attribute (one of the 2) in a <img></img> tag
Specifies alternate text for the image just in case it cant be displayed
<a></a>
An anchor tag which defines a hyperlink which is used to link one page to another
(adds a link within a webpage(one webpage within another)
The most important attribute of the <a> tag is href</a>
href : specifies the destination of the link
so you would use it as <a href = “ https:www.bbc.co.uk”</a>
Tag which defines a hyperlink which is used to link one page to another
<a></a>
Tag which defines an ordered list
<ol>
then <li> is used to define each item in the list
so:
<ol>
<li> Dog </li>
<li> Rat </li>
<li> Cat</li>
</ol>
OUTPUTS:
(1. Dog
2. Rat
3. Cat)
</li></ol>
How do the takes <ol> and <ul> defer?
<ol> is used to define an ordered list
<ul> used to define an unordered list
</ul></ol>
Tag used to define an unordered list
<ul>
then <li> is used to define each item in the list
so:
<ul>
<li> Dog </li>
<li> Rat </li>
<li> Cat</li>
</ul>
OUTPUTS:
(. Dog
. Rat
. Cat)
(bulletpoints)
</li></ul>
What does CSS stand for?
Cascading style sheets
Its used to describe the style of a webpage
If I had a heading how would I change the colour of it?
<h1>
</h1>
How would i change the bordercolour of a subheading so that its dotted and blue?
<h2>
</h2>
Why is there 3 different font names for this subheading?
<h3>
</h3>
Because its down to the fonts the browser actually supports. If it doesnt support the first one then it will try the next one
Create an external CSS file for a heading and subheading with the following properties
Heading: with font color red, background color yellow
Subheading: border color blue, font color red
<h1>
{
font-color: red;
background-color: yellow;
}
<h2>
{
font-color: red;
border-color: blue;
}
</h2></h1>
How would you link an external CSS file to a HTML file?
Using the link tag
<link></link>
<div> tag
</div>
To divide a HTML document up and change the style of it
<div> class = "main"
<p> Hi hello</p>
</div>
so the class main will have a different style (e.g. colour) to another class so therefore the text contained within each div tag will have the properties of that class
This allows us to have different styles within one class