1.3.4a HTML, CSS, JavaScript Flashcards
How is a HTML document formatted?
Starts with html tags and ends with /html tags
Head includes things like title
Body includes what is displayed on the webpage
How do you display the title of a webpage in HTML?
Use the (title) and (/title) tags within the head.
How do you create a heading in HTML?
Use the (h1), (h2), (h3) etc tags
How do you create a paragraph in HTML?
Use the (p) tags.
How do you add an image to a webpage using HTML?
(p) (img src=”filename” alt=”cannot load image” height=”200” width=”200”) (/p)
How do you add a link to a webpage using HTML?
This (a href =”hyperlink”) CLICK (/a) is a link.
How do you create lists in HTML?
Use the (ol) and (/ol) tags to start and end an ordered list. Use the (ul) and (/ul) tags to start and end an unordered list. Use the (li) and (/li) tags at the start and end of each list item.
What is CSS used for?
Allows developers to control the layout of multiple webpages at once.
Why is it better to write CSS code in a file separate from the HTML file?
If you write CSS code in the HTML file using the (style) tag, it will only affect the style of that page.
If you use external files, you can change the look of an entire site by amending 1 file.
How do you change the style of attributes within a HTML document using CSS?
(h1 style=”color:red;”) Text (/h1)
(h2 style=”border-style:dotted; border-color:blue”;) Text (/h2)
(h3 style=”font-family:Arial”;) Text (/h3)
How do you change the style of attributes in a webpage using an external CSS file?
h1{ ---------- color:red; ---------- background-color:yellow; ---------- border-width:thick }
h2{
——— font-family:Arial;
}
How do you link an external CSS file to a HTML document webpage?
In the head tag use:
link rel=”stylesheet” type=”text/css” href=”MyCSS.css”
How do you create a class in CSS?
In an external CSS file:
.classname {
——– color:red;
——– font-size:25px;
}
How do you link a class from an external CSS file using HTML?
(div class=”classname”)
/div
How do you create an identifier in an external CSS file?
#identifername { -------- color:red; }