33.5k views
13 votes
HTML code to display square bullets in an unordered list.​

1 Answer

9 votes

Answer:

Find the source code below.

Step-by-step explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of the HTML document contains the contents or informations of a web page to be displayed.

The complete code for the unordered list with square bullets is written below;

<! DOCTYPE html>

<html>

<head>

<title> Square bullets in an unordered list. </title>

</head>

<body>

<h1> My Favorite Subjects </h1>

<p> This is a list of my favorite subjects; </p>

<ul style =" list- style- type:square">

<li> Computer </li>

<li> Mathematics</li>

<li> Physics </li>

<li> History </li>

</ul>

</body>

</html>

Note: The code isn't indented because i'm not using an appropriate code editor.

Since we are creating a document with an unordered list, we would use the <ul> and </ul> parent tag while the child tag <li> and </li> sorts the list. Also, we would use the style attribute to specify the required inline style (square bullets) for the list.

User Reins
by
4.2k points