Lesson 04 Head Elements CIT 23010 Bro Horton
Lesson 04 - Head Elements CIT 230~10 – Bro. Horton By Saleem Dababneh
Title Element The HTML <title> Element is meta data. It defines the HTML document’s title. The title will not be displayed in the document, but might be displayed in the browser tab. The title provides a name for a page when added to favorites and is the display name for the page in search engine results. Notice in each example below how the title appears in the tab: Source: http: //www. w 3 schools. com/html_headings. asp
Meta Element Meta data means data about data. HTML meta data is data about the HTML document. The HTML <meta> element is also meta data. It can be used to define the character set, and other information about the HTML document. Source: http: //www. w 3 schools. com/html_headings. asp For a more comprehensive look at the HTML <meta> element visit : https: //html. spec. whatwg. org/multipage/semantics. html#the-meta-element
Meta Element Examples Source: https: //html. spec. whatwg. org/multipage/semantics. html#the-meta-element Source: http: //html 5 doctor. com/element-index/#meta
Link Element The HTML <link> Element defines the page relationship to an external resource. The link is most often used to link to style sheets as in the online example found here. Try the ‘See Results’ button before and after changing the css reference. Questions to consider: 1. Where in this sample code is the background color defined? 2. What color is the background when the href is pointing to a bad link? Source: http: //www. w 3 schools. com/html_head. asp
Script Element The HTML <script> Element is used to define client -side Java. Scripts. The script below writes ‘Hello Java. Script!’ into an HTML element with id=“demo”: Note how the <script> tag is closed out with an end tag of </script> Source: http: //www. w 3 schools. com/html_head. asp
Script Element Use Cases The Script element can be used to add dynamic controls to a page that will leverage the client-side system to perform operations such as calculations, dynamic comments, style changes and more. Here a few examples to test out: q Date & Time calculations – example q Changing existing content - example q Interactive Displays - example Source: http: //www. w 3 schools. com/js/js_intro. asp
- Slides: 7