Back to the 2023 paper

Module I: Introduction to Web Technologies & Architectures

20232m

Which of the following tag is used to embed CSS in HTML page?

(i) <css>
(ii) <!DOCTYPE html>
(iii) <script>
(iv) <style>

Worked SolutionAI Assisted

Answer

(iv) <style>

Step-by-step

  1. Embedded/Internal CSS means CSS written inside the HTML document.
  2. HTML provides the <style> element specifically for containing CSS rules.
  3. <css> is not a standard HTML element.
  4. <!DOCTYPE html> declares the HTML document type.
  5. <script> is used for JavaScript.

Example

<style>
  p { color: blue; }
</style>

Final answer: (iv) <style>

Similar questions