Advertisements
Advertisements
प्रश्न
How do you link an external stylesheet to a page.
विकल्प
<link href=’somefile.css’><link rel=’stylesheet’ src=’somefile.css’><script rel=’stylesheet’ href=’somefile.css’> </script><link rel=’stylesheet’ href=’somefile.css’>
MCQ
Advertisements
उत्तर
<link rel=’stylesheet’ href=’somefile.css’>
Explanation:
The explanation of the correct syntax is as follows:
- <link>: This HTML tag connects external files, like stylesheets, to the webpage.
- rel='stylesheet': This attribute defines the link’s relationship, stating that the connected file is a style document.
- href='somefile.css': This attribute specifies the path or URL destination of the target CSS file (here, "somefile.css").
Ultimately, utilising this tag with these specific attributes binds the external CSS file to the HTML document, applying those styles across the web page.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
